Issue
How to disable particular command for regular users in CageFS.
Environment
- Cloudlinux server with CageFS installed.
Solution
1. To exclude files and directories from CageFS, edit the file:/etc/cagefs/custom.black.list
2. And add files or directories in there, one per line.
3. Execute the following command to apply changes:
cagefsctl --force-update
Note: The file /etc/cagefs/black.list
will be replaced during the update of CageFS package.
For example for the DF command:
- Add 'df' to the custom blacklist file:
# echo "/bin/df" >> /etc/cagefs/custom.black.list
- And update CageFS:
cagefsctl --force-update
- A regular user will receive the "command not found" message.
Useful links
https://docs.cloudlinux.com/cloudlinux_os_components/#file-system-templates.
Comments
0 comments
Please sign in to leave a comment.