Announcement

Collapse
No announcement yet.

cagefs_enter_user weirdness

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

  • cagefs_enter_user weirdness

    Shortly after enabling CageFS on a server, we got a complaint from a customer that their site was throwing an error. I looked into their logs, and PHP was throwing "failed to open stream: No such file or directory" when trying to reference a file it needed (/home/chcc/public_html/config.php). Sure enough:

    Code:
    root@srv01 [/home/chcc/public_html]# ls -l config.php
    
    -rwxr-xr-x 1 chcc chcc 495 Jun 30 10:53 config.php*
    
    root@srv01 [/home/chcc/public_html]# cagefs_enter_user chcc "ls config.php"
    
    cagefs_enter_user: ls config.php: No such file or directory
    
    root@srv01 [/home/chcc/public_html]#
    However:

    Code:
    root@srv01 [/home/chcc/public_html]# cagefs_enter_user chcc "ls .."
    
    cagefs_enter_user: ls ..: No such file or directory
    
    root@srv01 [/home/chcc/public_html]# cagefs_enter_user chcc "ls ."
    
    cagefs_enter_user: ls .: No such file or directory
    
    root@srv01 [/home/chcc/public_html]#
    Disabling CageFS for that user also didnt fix the problem, so Im doubtful its een related to CageFS in the first place. However, Id still like to be able to use the cagefs_enter_user tool to debug issues that will inevitably come up in the future, and this behavior doesnt make sense. Am I just misunderstanding something here?

  • #2
    It is not correct to use cagefs_enter_user to access his filesystem structure, please use "cagefsctl -e username" instead:

    > -e | --enter : enter into users CageFS as root

    This will fully mount users filesystem and give you chroot into it.

    About the original issue with config.php, are you sure it is looking for a file in /home/chcc/public_html ? do you see this full path in error log or you just assume it?

    Comment


    • #3
      Thanks, cagefsctl -e is what I was actually looking for.

      As for the original issue, the full absolute path was displayed in the error log. The file is accessible using cagefsctl -e, and the problem also doesnt go away when I disable CageFS for that user, so Im thinking the cause is actually unrelated to CageFS, and Im looking at other potential causes now.

      Thanks for your help.

      Comment

      Working...
      X