What is CageFS, and why can’t I see certain files or commands?

CloudLinux 3 min read

CageFS is one of the key security features of the CloudLinux operating system: a virtualised file system that confines each hosting account to its own ‘cage’. On our cPanel and WordPress hosting plans, every account runs on CageFS.

What does this mean in practice?

Many hosting accounts share the server, but thanks to CageFS, each one sees the system as if it were the only one on it:

  • Other users are not visible. The account cannot see other users on the server, nor their names or files.
  • Only your own processes are visible. The ps or top commands only show the processes running in your own account.
  • The server settings remain hidden. The system’s configuration files (such as the web server settings) are not readable, and the /etc/passwd file contains only the necessary entries.
  • Private /tmp directory. Each account is allocated its own temporary directory, which is not visible to other accounts. This directory counts towards the account’s storage quota, and the system automatically deletes files from it that have not been used for 30 days.

All of this is transparent to websites: no changes need to be made to PHP scripts, cron jobs or applications.

Why is this good for you?

If a website in another account is hacked, or a faulty script is running on it, it cannot access your files or database passwords, nor can it install malware on your account. CageFS also prevents most privilege escalation and information-gathering attacks. Resource isolation – ensuring that traffic from other sites does not slow down yours – is handled by another component of CloudLinux, LVE; see: Resource limits for aWh hosting plans.

Why is a command missing in SSH?

In SSH and the cPanel terminal, only programs deemed secure are accessible. The usual tools (such as php, git, mysql, wp, rsync, tar, zip, the nano and vi text editors, and the mc file manager) are available, but system administration programs are not, and there are no root privileges.

Composer is not located in the default directory, but is installed separately for each PHP version and runs with the PHP version to which it belongs. For example, for PHP 8.4:

/opt/alt/php84/usr/bin/composer install

Replace the version number (php84) with the one used by your website (php83, php85, etc.). If you use this frequently, you can add a shortcut to the ~/.bashrc file, so that from your next login onwards, simply running the composer command will suffice:

echo "alias composer='/opt/alt/php84/usr/bin/composer'" >> ~/.bashrc

If you require a program for your work that is not currently available, please contact our support team. If the program can be run securely in a shared environment, we will make it available to you.

Frequently Asked Questions

Why can’t I see the server’s total CPU and memory usage? CageFS does not display anything other than its own processes. You can view your account’s resource usage on the cPanel Resource Usage page; see: How can I check my CloudLinux LVE resource usage in real time?

A file has gone missing from the /tmp directory. The system automatically deletes temporary files that have not been used for 30 days. Permanent files are stored in your own directory.

Can I access the files in another account I own? Two hosting accounts cannot access each other’s files directly, even if both belong to you. You can transfer files via FTP, through the File Manager or using the hosting migration methods.

Back: CloudLinux articles (15)