Forum
  1. Forums
  2. CloudLinux and Control Panels
  3. CloudLinux and cPanel
  1. Ryan
  2. Thursday, November 30, 2017
  3.  Subscribe via email
Is it possible to pipe to a program outside the user's home directory?

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

My CageFS config has:
/opt
I've 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
Rate this post:
  1. 01.12.2017 11:12:55
  2. # 1
Vladimir Accepted Answer
Posts: 45
Joined: 04.07.2017
0
Votes
Undo
Hello,

Yes, it should be possible. But could you please clarify, why this program should be located outside of user's cage?
Have you checked if /opt/xxx/xxx/ accessible from user's cage?
Also, you need to remount cagefs-skeleton, if CageFS config has been changed:
# cagefsctl --remount-all
  1. 04.12.2017 21:12:03
  2. # 2
Ryan Accepted Answer
Posts: 12
Joined: 18.10.2016
0
Votes
Undo
The program is a custom one I'm 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. I've run "cagefsctl -e $USERNAME" and can view the file in question as permissions 755. Is this the best way to test?
  1. 05.12.2017 06:12:45
  2. # 3
Vladimir Accepted Answer
Posts: 45
Joined: 04.07.2017
0
Votes
Undo
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-us/articles/115004087393
  1. 05.12.2017 17:12:24
  2. # 4
Ryan Accepted Answer
Posts: 12
Joined: 18.10.2016
0
Votes
Undo
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 - that's where I get the failure.

The only thing I can think that might be causing it is the shebang. I'm using #!/usr/local/bin/php .... does this get handled differently when it's outside of a home directory? I wouldn't think so.
  1. 05.12.2017 18:12:26
  2. # 5
Vladimir Accepted Answer
Posts: 45
Joined: 04.07.2017
0
Votes
Undo
Please submit a ticket to https://cloudlinux.zendesk.com, our techs will check the issue in place.
  • 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
• Remove Upload Files (Maximum File Size: 2 MB)
You may insert polls into your post. The poll would then appear in the post.
Vote Options
Captcha
To protect the site from bots and unauthorized scripts, we require that you enter the captcha codes below before posting your question.