CageFS and jailshell
Forum
  1. Forums
  2. CloudLinux and Control Panels
  3. CloudLinux and cPanel
  1. Scott Mutter
  2. Tuesday, 26 January 2016
  3.  Subscribe via email
Are shells really updated to bash?
Rate this post:
  1. 26.01.2016 12:01:26
  2. # 1
Scott Mutter Accepted Answer
Posts: 56
Joined: 23.04.2014
0
Votes
Undo
According to the documentation converting to CageFS on a server is suppose to convert all jailshell users to bash. But is this really happening? This didn\'t appear to be the case when I switched a server over to CageFS, I had to manually update jailshell users to bash. Is that correct?

Also, what about crontabs. Crontabs run in jailshell on cPanel servers. Should these be updated to bash?
  1. 26.01.2016 13:01:02
  2. # 2
Bogdan Accepted Answer
Posts: 709
Joined: 26.06.2013
0
Votes
Undo
Users shells are switched from jailshell to bash on cagefs installation phase. Did you really run \'yum install cagefs\', \'cagefsctl --init\' etc and shells are left as jailshell?

About crontabs, I believe they will be switched automatically to normal shells after you enable shell via WHM.
  1. 26.01.2016 14:01:52
  2. # 3
Scott Mutter Accepted Answer
Posts: 56
Joined: 23.04.2014
0
Votes
Undo
I had one user on the server I converted that was using jailshell. It did not automatically change to /bin/bash after cagefsctl --init

Where does CloudLinux get the information that an account is using jailshell? When I give out shell access, I set the shell from the command-line usermod -s /usr/local/cpanel/bin/jailshell <user> instead of using the WHM interface. Perhaps CloudLinux/CageFS is getting this list of jailshell users from some other source other than a direct reading of /etc/password?

What about crontabs that are already set? The SHELL variable in all of the /var/spoo/cron files is still set to /usr/local/cpanel/bin/jailshell[b]

I have another server I am planning to convert to CageFS, I can try this out on that server.
[/b]
  1. 27.01.2016 11:01:38
  2. # 4
Bogdan Accepted Answer
Posts: 709
Joined: 26.06.2013
0
Votes
Undo
I have just clarified this situation with our developers, jailshell is changed to bash on CageFS install or package update. We parse /etc/passwd for that.

About crontabs - it is not needed to change them as from CageFS inside they are symlinks to /bin/bash :

lrwxrwxrwx 1 root root 9 Jan 11 19:47 /usr/share/cagefs-skeleton/usr/local/cpanel/bin/jailshell -> /bin/bash*

And yes, please let us know how it goes on new server.
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!
Guest
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below. Supports gif,jpg,png,zip,rar,pdf
• Insert • Remove Upload Files (Maximum File Size: 2 MB)
Captcha
To protect the site from bots and unauthorized scripts, we require that you enter the captcha codes below before posting your question.