CageFS and jailshell

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • scott
    Senior Member
    Forum ExplorerTechnical AssociateSolutions Developer
    • Mar 2021
    • 119

    #1

    CageFS and jailshell

    Are shells really updated to bash?
  • scott
    Senior Member
    Forum ExplorerTechnical AssociateSolutions Developer
    • Mar 2021
    • 119

    #2
    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 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?

    Comment

    • bogdan.sh
      Administrator
      • Nov 2016
      • 1220

      #3
      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.

      Comment

      • scott
        Senior Member
        Forum ExplorerTechnical AssociateSolutions Developer
        • Mar 2021
        • 119

        #4
        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

        I have another server I am planning to convert to CageFS, I can try this out on that server.

        Comment

        • bogdan.sh
          Administrator
          • Nov 2016
          • 1220

          #5
          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.

          Comment

          Working...