| OS X - Operating System General OS operation information and support |
| Post Reply | New Thread | Subscribe |
|
|
Thread Tools |
![]() Member Since: Mar 12, 2010
Posts: 3
![]() |
I have a web site on a Mac server that uses php's "exec" function to run a bash script on the server. It's password protected, and can only run certain code, so I'm not worried about security.
My problem is that I want to add a feature that requires the sudo command. However, the script is run by the user _www, which apparently can't do the sudo command. What are my options for making this work? Thanks! |
| QUOTE Thanks | |
![]() Member Since: Oct 19, 2008
Location: Ottawa
Posts: 15,453
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Mac Specs: 2012 13" MBP (2.5 i5, 8GB)
|
Try following the instructions here to add the user to the sudoers file. Now, you're going to need root access to this machine to edit the sudoers file. Do you have access?
Important Links: Community Guidelines : Use the reputation system if you've been helped. M-F Blog :: Write for the blog :: M-F IRC Channel - Chats every Sunday at 8PM EST. |
| QUOTE Thanks | |
![]() Member Since: Mar 12, 2010
Posts: 3
![]() |
Ok, it's trickier than I thought.
The script must be run as root. Is there any way I can run a script as root from _www? Another option is to disect the script, and add the actual commands directly into my script. They seem to just be a set of 3 launchctl commands. How can I run launchctl commands as _www? |
| QUOTE Thanks | |
| Post Reply | New Thread | Subscribe |
| Thread Tools | |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
|
|||||||
Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| Issue running FTP server! | Bassi | OS X - Operating System | 5 | 09-29-2009 06:01 PM |
| Transferring User Settings from iBook harddrive to New Mac Pro | beanlynch | OS X - Operating System | 1 | 06-24-2009 03:43 PM |
| running slow. need more ram ? | vinegret | Apple Notebooks | 5 | 10-12-2008 10:02 AM |
| G5 Doesn't Find Right User Files After Restore | SargassoC | OS X - Operating System | 0 | 03-03-2008 02:23 PM |
| The "Home" for user 'x' cannot be found in the usual place.... OSX 10.3.9 | grantscooter | OS X - Operating System | 2 | 03-22-2007 07:59 AM |
All times are GMT -4. The time now is 09:53 PM.
Powered by vBulletin