Announcement

Collapse
No announcement yet.

cagefs on Directadmin, /sbin/consoletype error after SSH login (fixed)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • cagefs on Directadmin, /sbin/consoletype error after SSH login (fixed)

    I create a default login for one user.

    I am missing the sbin in the initial mount. So when I login I get an error about /sbin/consoltype not available.

    Then I change cagefs.mp(add sbin) in /etc/cagefs

    When I do: cagefsctl --disable test80
    The user is disabled but the drive is still mounted(cagefsctl -l) so nothing changed(perhaps it should be gone after disable user).
    Then I do cagefsctl --unmount test80 and the mount is gone.

    The I re-enable the user and login again the console message is gone.
    :idea:

  • #2
    Michel,

    Here is a better approach (and this issue will be fixed in next version, it is fairly rare, only happens with users using csh as shell).

    First of all, remove sbin from cagefs.mp -- it has a few suid programs that shouldn be inside CageFS
    Then
    Add cagefs template in /etc/cagefs/conf.d like: consoletype.cfg
    In it:
    [consoletype]
    comment=consoletype script for csh
    paths=/sbin/consoletype

    Execute: cagefsctl --update
    Followed by cagefsctl --unmount-all

    That will add /sbin/consoletype into the template, and will remount all the users.

    Comment


    • #3
      Hi Igor,

      Thanks for responding!

      I saw no harm in it because I only have consoletype in the sbin directory :-)
      I changed it the way you suggested but the file consoletype does not shop up in the cage.

      /sbin/consoletype was already in binutils.cfg also ?

      Michel.

      Comment


      • #4
        Michel,

        /sbin has lots of files in most cases, like modprobe, reboot, etc...

        If consoletype was already in binutils -- I am not sure why it failed at all. Very strange.

        Comment


        • #5
          You are right, more files exist in /sbin, so forget what I said :-)

          Only when I add /sbin to cagefs.mp it works.
          Then only the consoletype file is available in the cage /sbin map, not the rest.
          When I remove sbin from cagefs.mp it does not work.

          If you want you can have a look at the server(no users on it).

          Comment


          • #6
            Sure, please, submit a ticket at helpdesk.cloudlinux.com with access info, and I will take a look.

            Comment


            • #7
              Michel,

              You were right, you needed to add sbin to cagefs.mp
              One thing to make sure, it is sbin, not /sbin that has to be added (otherwise, full /sbin from root partition would be mounted).

              I forgot that this version doesn automatically update cagefs.mp, the next one will pick up all the needed folders in automated fashion.

              Comment

              Working...
              X