What is CageFS?

CageFS is a virtualized file system and a set of tools to contain each user in its own 'cage'. Each customer will have its own fully functional CageFS, with all the system files, tools, etc.

Now let's see how to add FTP commands to the CageFS:

1. Ithe binary ‘FTP’ is already present on the server.
root@myserver [~]# ftp
2. On Check we fount that the command was available on the server. Let’s see after switching to a normal user.
root@myserver [~]# su - xxxx
xxxx@myserver [~]# ftp
-bash: ftp: command not found
3. Its confirmed that the command “ftp” is not available to the users. Now we are going to add this to CageFS so that the command becomes available to users.
4. We can add any RPM’s,  if they are installed on the server. First of all, find the full path of the command using the ‘which’ command:
root@myserver [~]# which ftp
5. Once you have found the full path, find out its package.
root@myserver [~]# rpm -qf /usr/bin/ftp
 6. Now let’s add the package/rpm to CageFS
root@myserver [~]# cagefsctl --addrpm ftp-0.17-54.el6.x86_64
 7. You need to update CageFS so that its added to every user’s cage.
root@myserver [~]# cagefsctl --force-update

8. Once the command is executed, switch to a user’s account and verify that command is available.

root@myserver [~]# su - xxxx
 xxxx@myserver [~]# ftp

9. That’s all and the command ftp will be available for the user now.

Was this answer helpful? 0 Users Found This Useful (0 Votes)