Running Command Inside CageFS

Navigation:  CageFS >

Running Command Inside CageFS

Previous pageReturn to chapter overviewNext page

[lve-wrappers 0.6-1+]

 

Sometimes you will need to execute a command as user inside CageFS.

 

If a user has shell enabled - you can simply use:

 

$ /bin/su - $USERNAME  -c "_command_"

 

Yet, if user has shell disabled, it wouldn't work. To solve this issue, we have added command:

 

/sbin/cagefs_enter_user $USERNAME "_command_"

 

If you disable CageFS for a user,  then cagefs_enter will be executed without proxyexec.

 

You can forcibly disable cagefs_enter start via proxyexec for all users (regardless if CageFS is enabled or disabled) by specifying the parameter cagefs_enter_proxied=0 in /etc/sysconfig/cloudlinux.

 

/bin/cagefs_enter.proxied can be executed instead of /bin/cagefs_enter to enter CageFS without proxyexec. Note that starting cagefs_enter via proxyexec is necessary to enable sending local notification messages to users with enabled CageFS. cagefs_enter is executed via proxyexec by default.