Email Pipe to program with CageFS

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • noyearzero
    Member
    Forum ExplorerTechnical Associate
    • Mar 2021
    • 66

    #1

    Email Pipe to program with CageFS

    Is it possible to pipe to a program outside the users home directory?

    For example:
    /opt/xxx/xxx/file.php (which is 0755)

    My CageFS config has:
    /opt
    Ive also tried adding:
    /opt/xxx/xxx

    I get an error email that says:
    ------ pipe to |/opt/xxx/xxx/file.php
    .....
    Exception: Zend Extension /opt/xxx/xxx/file.php does not exist
  • vmarchuk
    Senior Member
    • Mar 2017
    • 142

    #2
    Hello,

    Yes, it should be possible. But could you please clarify, why this program should be located outside of users cage?
    Have you checked if /opt/xxx/xxx/ accessible from users cage?
    Also, you need to remount cagefs-skeleton, if CageFS config has been changed:
    # cagefsctl --remount-all

    Comment

    • noyearzero
      Member
      Forum ExplorerTechnical Associate
      • Mar 2021
      • 66

      #3
      The program is a custom one Im creating that applies to all users on the server.

      I have php files in this same directory that each user can include and that works fine. Ive run "cagefsctl -e $USERNAME" and can view the file in question as permissions 755. Is this the best way to test?

      Comment

      • vmarchuk
        Senior Member
        • Mar 2017
        • 142

        #4
        If you want to enter CageFS as a user, you should use the following command:
        # /bin/su - $USERNAME -s /bin/bash

        Also, this article might be helpful for you:
        https://cloudlinux.zendesk.com/hc/en...s/115004087393

        Comment

        • noyearzero
          Member
          Forum ExplorerTechnical Associate
          • Mar 2021
          • 66

          #5
          Using the test you describe provides good results. I can still view the file in question as 755.

          The article is good and I got the pipe working when it pipes to a script within the actual home directory. However if I change it to pipe to the /opt/xxx/xxx/file.php - thats where I get the failure.

          The only thing I can think that might be causing it is the shebang. Im using #!/usr/local/bin/php .... does this get handled differently when its outside of a home directory? I wouldnt think so.

          Comment

          • vmarchuk
            Senior Member
            • Mar 2017
            • 142

            #6
            Please submit a ticket to https://cloudlinux.zendesk.com, our techs will check the issue in place.

            Comment

            Working...