Differences

This shows you the differences between two versions of the page.

Link to this comparison view

cloudlinux:how-to-add-commands-to-cagefs-users [2015-07-01 17:52:18]
rory.blanchard created
cloudlinux:how-to-add-commands-to-cagefs-users [2015-07-09 12:56:44]
rory.blanchard
Line 1: Line 1:
 ====== How to add additional commands to CageFS users in CloudLinux ====== ====== How to add additional commands to CageFS users in CloudLinux ======
  
-<note>Adding these will allow them to be used by all users after CageFS has been reinitialized.</note>+<note>Adding these will allow them to be used by all users after CageFS has been updated.</note>
  
 +===== Adding paths to commands and files =====
 Use **SSH** to log into your server as root. Use **SSH** to log into your server as root.
  
-Using your favorite text editor, open the file **/etc/cagefs/conf.d/binutils.cfg**+Using your favorite text editor, open the file **/etc/cagefs/conf.d/custom.cfg**. If the file doesn't already exist, this will create it.
 \\ \\
 <code> <code>
Line 11: Line 12:
 </code> </code>
 \\ \\
-You will see a list of commands separated by commas on the line that starts with **paths**+You will want to add a list of paths separated by commas on the line that starts with **paths**
 \\ \\
 <code> <code>
-paths=/bin/arch, /bin/awk, /bin/basename, /bin/cat, /bin/chgrp...+[custom] 
 +comment=custom paths 
 +paths=/usr/local/bin/composer
 </code> </code>
 \\ \\
 Append the full path of the command you want to add; one at a time, separated by commas to the end of the line. Once you have added what you want, save the file. Append the full path of the command you want to add; one at a time, separated by commas to the end of the line. Once you have added what you want, save the file.
  
-To apply the change, run the following command **cagefsctl -r** and you will see the following output:+To apply the change, run the following command **cagefsctl --force-update**  
 +\\ 
 +<code> 
 +cagefsctl --force-update 
 +</code> 
 +\\ 
 +===== Adding packages to CageFS users ===== 
 + 
 +If your program was installed via **Yum**, you can add the entire package through a different method. 
 + 
 +Use **SSH** to log into your server as root. 
 + 
 +Run the following command with the name of the package that you want to add to add: 
 +\\ 
 +<code> 
 +cagefsctl --addrpm <packagename> 
 +</code> 
 +\\ 
 +\\ 
 +Once you've added the package, run **cagefsctl --force-update** to update the cageFS user configuration.
  
 <code> <code>
-**cagefsctl -r** +cagefsctl --force-update
-WARNING:  10 CageFS currently mounted. +
-If you proceed, CageFS will be temporarily disabled and unmounted. +
-Do you want to continue (yes/no)? yes +
- CageFS has been disabled +
-Copying /usr/bin/git to /usr/share/cagefs-skeleton/usr/bin/git +
-Updating users ... +
-CageFS has been enabled +
-Updating statuses of users ...+
 </code> </code>
 \\ \\
 +<note tip>The changes will not be applied until you update it</note>
 \\ \\