cpanel uses jailshell for cron (problem)

Aaron.Edwards

Active Member
Sep 21, 2013
36
0
6
cPanel Access Level
Root Administrator
It just gives a bunch of warnings like:

Code:
warn [-e] Virtfs mountpoint failed to umount: /home/virtfs/USER/var
warn [-e] Virtfs directory "/home/virtfs/USER/var" was not umounted properly, not removing
Not sure why this has been thrown.

====cPanel Docs about VirtFs=======

At this moment, I recommend you to post a cPanel ticket. Johnson, Did you post your ticket with cPanel already?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
/scripts/clear_orphaned_virtfs_mounts does nothing. So now any command that deals with /proc/mounts takes much more time to execute, for example "ifconfig" takes 6 seconds to execute. This is NOT NORMAL and should be taken care of ASAP.
Please submit bug reports via:

Submit A Bug Report

Feature requests can be opened via:

Submit A Feature Request

Thank you.
 

Johnson

Active Member
Apr 16, 2003
44
0
156
Code:
# wc -l /proc/mounts 
16968 /proc/mounts
Another one :) So far this seems to affect only CentOS-5, have not seen this problem on CentOS-6 yet.

Feature requests can be opened via:

Submit A Feature Request
Such feature request already exists, but it's not very popular :)
option to turn off jailshell for crontab | cPanel Feature Requests

Johnson, Did you post your ticket with cPanel already?
No because we have this problem on many servers and I don't see how a ticket can help us here. We're just changing "SHELL" variable in users' crontabs on all servers with our automation tools to work-around this issue. I'm pretty sure cPanel support staff would do the same to "fix" the problem.
 

cPanelNick

Administrator
Staff member
Mar 9, 2015
3,482
35
208
cPanel Access Level
DataCenter Provider
CentOS 5 uses an older kernel and older toolchain that must transverse each mount in /proc/mounts for many common operations. If you have > 300 users using jailed shell with exim, crontab, or normal logins the system does not scale well. There is little we can do to improve without making significant security concessions as the poor performance is a result of the underlying operating system toolchain.

If you are using CentOS 5 or RHEL 5:
  • Your best option would be to upgrade to CentOS 6 or RHEL 6 as the tool chain does not have to transverse /proc/mounts for simple operations (such as ls)
  • If you are unable to upgrade, the less ideal solution is to set user's shells to a normal shell.