Old 14th May 2008, 20:03
Baggus Baggus is offline
Junior Member
Join Date: May 2008
Posts: 8
Thanks: 1
Thanked 2 Times in 2 Posts
Question Changing the Apache user.


I have a server running Ubuntu LTS 8.04 and i would like to change the user apache(+php) runs as.

Basically, the below script should return "ftpuser".
$cmd = "whoami";
$output = shell_exec($cmd);
echo "<pre>$output</pre>";
And so far, i have been completely failing at doing this.

I have tried altering the /etc/apache2/envvars but this doesnt change anything, even after rebooting server or restarting apache.

<background info>
I have to do this so i can delete files apache creates through php ShellExec from an FTP client. (and php needs to be able to delete files that where uploaded through ftp with ShellExec('rm '.$filename);
</background info>

Any help would be greatly appreciated
Reply With Quote
Sponsored Links
Old 15th May 2008, 09:40
topdog topdog is offline
Senior Member
Join Date: Jan 2008
Location: South Africa
Posts: 1,352
Thanks: 0
Thanked 154 Times in 151 Posts

Why dont you use the group feature instead and use sguid on the directory to ensure that the files created inherit the directories group.
http://www.topdog.za.net - Got Linux problems ? - I can help.
http://www.baruwa.org - Try it.
Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Statistic not working mzo Installation/Configuration 49 20th April 2011 13:19
Anything I can do against illegal login-requests? schmidtedv Installation/Configuration 17 7th November 2008 10:25
CENTOS 5 Ping Problem gAnDo Server Operation 11 28th March 2008 21:58
Ruby / FastCGI Problem Chad Server Operation 1 8th March 2008 21:38
log files cruz Technical 3 15th May 2007 15:35

All times are GMT +2. The time now is 07:57.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.