HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- PHP or PERL CGI script permission question
Operating System - Linux
1827707
Members
2822
Online
109967
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2005 09:29 PM
08-01-2005 09:29 PM
PHP or PERL CGI script permission question
I want to create a web control panel for clients to check his quota or change password but PHP or PERL CGI execute script using the 'www' user permission. How can I override this? Does the world have any resources about doing this?
THX.
THX.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2005 10:42 PM
08-01-2005 10:42 PM
Re: PHP or PERL CGI script permission question
Hi Paul,
you could install sudo, and edit a sudoers file (i.e. as root run visudo) where you would setup rules for user www to run the commands that were required for the quotas checking.
You can either get the sources from here
http://www.courtesan.com/sudo/
or if you happen to run 11i you could even get a prepackaged sudo depot from HP
http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=HPUXIEXP1111
Another option maybe would be to get the Apache sources (if you're happening to be running this webserver) and build it for SuExec support
(albeit it was originally meant to rather restrict than empower rights)
Please see
http://httpd.apache.org/docs/2.0/suexec.html
Anyway, whatever cludge you use please bear in mind to devise utmost care with your CGIs as the restricted rights of httpd child procs were introduced for very good reasons.
Also you should devise some sort of taint checking of any client input, like Perl guarantees by its -T switch.
(if you happen to write your CGIs in Perl,
please also read "perldoc perlsec")
HTH
Ralph
you could install sudo, and edit a sudoers file (i.e. as root run visudo) where you would setup rules for user www to run the commands that were required for the quotas checking.
You can either get the sources from here
http://www.courtesan.com/sudo/
or if you happen to run 11i you could even get a prepackaged sudo depot from HP
http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=HPUXIEXP1111
Another option maybe would be to get the Apache sources (if you're happening to be running this webserver) and build it for SuExec support
(albeit it was originally meant to rather restrict than empower rights)
Please see
http://httpd.apache.org/docs/2.0/suexec.html
Anyway, whatever cludge you use please bear in mind to devise utmost care with your CGIs as the restricted rights of httpd child procs were introduced for very good reasons.
Also you should devise some sort of taint checking of any client input, like Perl guarantees by its -T switch.
(if you happen to write your CGIs in Perl,
please also read "perldoc perlsec")
HTH
Ralph
Madness, thy name is system administration
- Tags:
- sudo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2005 02:36 AM
08-02-2005 02:36 AM
Re: PHP or PERL CGI script permission question
You could just make your CGI write to a file and have a background process that runs as whatever account you want that monitors this file and then executes whatever you need done.
As mentioned, be careful however you implement it. You don't want to open your server up to the world.
As mentioned, be careful however you implement it. You don't want to open your server up to the world.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP