Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Run a php script under a different user
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
vdboor
Guru
Guru


Joined: 03 Dec 2003
Posts: 592
Location: The Netherlands

PostPosted: Wed Jan 21, 2004 8:57 am    Post subject: Run a php script under a different user Reply with quote

Is it possible to run a php script as another user?

I've put restrictions on /proc with the grsecurity settings, and only members of the "procview" group may access certain proc features. In my private webpanel, I have phpsysinfo and it needs access to /proc. ..but I don't want to make the "apache" user a member of "procview".

In other words, is there a way to work arround this?
_________________
The best way to accelerate a windows server is by 9.81M/S²
Linux user #311670 and Yet Another Perl Programmer

[ screenies | Coding on KMess ]
Back to top
View user's profile Send private message
fleed
l33t
l33t


Joined: 28 Aug 2002
Posts: 756
Location: London

PostPosted: Wed Jan 21, 2004 11:17 am    Post subject: Reply with quote

Does this help?
Back to top
View user's profile Send private message
vdboor
Guru
Guru


Joined: 03 Dec 2003
Posts: 592
Location: The Netherlands

PostPosted: Wed Jan 21, 2004 3:48 pm    Post subject: Reply with quote

well, a bit perhaps.

If I understand this right, I need to run the script as a CGI-script, which wraps php. And the script needs to be setuid.

I do have a question about setuid programs; what permissions do I need to set? I've tried a lot in the past, but never got a program running as another limited user. I've tried to run a fetchmail-cgi script with my user-privs once (also from a webserver) and didn't have much success with this.
_________________
The best way to accelerate a windows server is by 9.81M/S²
Linux user #311670 and Yet Another Perl Programmer

[ screenies | Coding on KMess ]
Back to top
View user's profile Send private message
fleed
l33t
l33t


Joined: 28 Aug 2002
Posts: 756
Location: London

PostPosted: Wed Jan 21, 2004 4:03 pm    Post subject: Reply with quote

What happened when you tried it in the past? Did it just not do anything or what?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum