Virfs directory in CPanel

The /home/virtfs Directory is created for users with Jailshell. Virtfs is bind mount to some system files. If you delete the files in virtfs, you delete the actual system files they’re bind mount to; that’s very bad idea. When a user is logged in via jailshell, a virtual fileystem is created for the cpanel user by mounting only the selected filesystems under /home/virtfs/ so the user can (only) access the data under these filesystems. There are two option to get rid of the /home/virtfs directory:

Option One

  1. Backup your/your clients’ data, request OS reload from your host and restore your clients’ data
  2. It is best not to touch that directory. Go through the list of users in WHM >> Manage Shell Access and disable Jailed Shell for users. For more information you can refer disable virtfs PDF File.  

Option Two

Check if there’s any jailshell process running and if so, kill the process. If none, you may run the following bash one liner in order to fix this issue:

for i in `cat /proc/mounts|awk '/virtfs/ {print $2}'`; do umount $i;done

Run du again and you should see that /home/virtfs is hardly consuming any space at all

This entry was posted in CPanel. Bookmark the permalink.

Leave a Reply

Your email address will not be published.