Man page - lxc-usernsexec(1)
Packages contains this manual
- lxc-user-nic(1)
- lxc-config(1)
- lxc-checkconfig(1)
- pam_cgfs(8)
- lxc-update-config(1)
- lxc-freeze(1)
- lxc-autostart(1)
- lxc-device(1)
- lxc-destroy(1)
- lxc.conf(5)
- lxc-info(1)
- lxc-wait(1)
- lxc-checkpoint(1)
- lxc-stop(1)
- lxc-console(1)
- lxc-top(1)
- lxc(7)
- lxc.container.conf(5)
- lxc-attach(1)
- lxc.system.conf(5)
- lxc-create(1)
- lxc-unshare(1)
- lxc-copy(1)
- lxc-execute(1)
- lxc-monitor(1)
- lxc-snapshot(1)
- lxc-start(1)
- lxc-unpriv-attach(1)
- lxc-unpriv-start(1)
- lxc-usernsexec(1)
- lxc-usernet(5)
- lxc-ls(1)
- lxc-cgroup(1)
- lxc-unfreeze(1)
apt-get install lxc
Available languages:
en ko jaManual
lxc-usernsexec
NAMESYNOPSIS
μ€ λͺ
μ΅ μ
μ μ
μ°Έ μ‘°
NAME
lxc-usernsexec - μ λ‘ μ΄ μ¬ μ© μ λ€ μ μ€ ν μ΄ μ€ μ μ rootλ‘ ν μ€ ν¬ λ₯Ό μ€ ν
SYNOPSIS
lxc-usernsexec [-m uid-map ] {-- command}
μ€ λͺ
lxc-usernsexec λ μ λ‘ μ΄ μ¬ μ© μ λ€ μ μ€ ν μ΄ μ€ μ μ 루 νΈ λ‘ ν μ€ ν¬ λ₯Ό μ€ ν ν λ€ .
μ΅ μ
-m uid-map
μ¬ μ© μ λ€ μ μ€ ν μ΄ μ€ μ μ μ¬ μ© λ uid λ§΅ . κ° κ° μ λ§΅ μ 4κ° μ μ½ λ‘ (:)μΌ λ‘ κ΅¬ λΆ λ κ° λ€ λ‘ κ΅¬ μ± λ μ΄ μ λ€ . 첫 λ² μ§Έ λ βuβ, βgβ, βbβ λ¬Έ μ λ‘ κ° κ° UID, GID, λ λ UID λ° GID λ₯Ό κ° λ¦¬ ν¨ λ€ . κ·Έ λ€ μ μ μ¬ μ© μ λ€ μ μ€ ν μ΄ μ€ λ΄ μ μ μ UID, κ·Έ λ€ μ μ νΈ μ€ νΈ μ UID, κ·Έ 리 κ³ λ§ μ§ λ§ μΌ λ‘ λ§€ ν ν IDμ μ λ₯Ό μ§ μ ν λ€ .
λ§΅ μ 1κ° μ΄ μ λ μ§ μ κ° λ₯ ν λ€ . λ§ μ½ λ§΅ μ΄ μ§ μ λ μ§ μ μ λ€ λ©΄ , κΈ° λ³Έ κ° μ /etc/subuidμ /etc/subgidμ μ ν μ© λ λͺ¨ λ λ² μ μ uid, gidκ° μ»¨ ν μ΄ λ λ΄ μ μ 0λ² λΆ ν° λ§€ ν λ λ€ .
lxc-usernsexec λ μΈ μ λ 0λ² setuidμ setgidλ₯Ό μ λ ν λ€ λ κ² μ μ£Ό μ ν΄ μΌ ν λ€ . κ·Έ λ¬ λ― λ‘ λ€ μ μ€ ν μ΄ μ€ λ΄ μ μ uid 0μ λ§€ ν μ΄ λ μ΄ μ μ΄ μΌ ν λ€ .
μ μ
ν λΉ λ λͺ¨ λ subuidλ₯Ό 컨 ν μ΄ λ μ λ§€ ν ν΄ μ μ μ μ€ ν ν λ € λ©΄ ,
|
lxc-usernsexec |
λ₯Ό μ¬ μ© ν λ©΄ λ λ€ . /bin/sh λ μ λ€ λ₯Έ μ μ μ€ ν ν λ € λ©΄ ,
|
lxc-usernsexec -- /bin/bash |
λ₯Ό μ¬ μ© ν λ©΄ λ λ€ .
λ§ μ½ ν μ¬ UIDκ° 1000μ΄ κ³ , 컨 ν μ΄ λ μ rootκ° 190000μΌ λ‘ λ§€ ν λ μ΄ μ μΌ λ©° , ν μ¬ μ¬ μ© μ κ° μ μ ν κ³ μ λ ν μΌ μ 컨 ν μ΄ λ μ rootκ° μ μ ν λ λ‘ ν λ € λ©΄ , μ λ μ² λΌ ν λ©΄ λ λ€ .
|
lxc-usernsexec -m b:0:1000:1 -m b:1:190000:1 -- /bin/chown 1:1 $file |
μ΄ κ² μ ν μ¬ UIDλ₯Ό μ¬ μ© μ λ€ μ μ€ ν μ΄ μ€ λ΄ μ μ rootλ‘ ν κ³ , 190000μ uid 1λ‘ λ§€ ν ν λ€ . μ¬ μ© μ λ€ μ μ€ ν μ΄ μ€ μ rootλ λ€ μ μ€ ν μ΄ μ€ μ λͺ¨ λ UIDμ κΆ ν μ΄ μ κΈ° λ λ¬Έ μ , νΈ μ€ νΈ μ μ chownμ μ¬ μ© ν μ μ λ λΌ λ ν μΌ μ μ μ μ λ₯Ό λ³ κ²½ ν μ μ λ€ .
μ°Έ μ‘°
lxc (7), lxc-create (1), lxc-copy (1), lxc-destroy (1), lxc-start (1), lxc-stop (1), lxc-execute (1), lxc-console (1), lxc-monitor (1), lxc-wait (1), lxc-cgroup (1), lxc-ls (1), lxc-info (1), lxc-freeze (1), lxc-unfreeze (1), lxc-attach (1), lxc.conf (5)