Ubuntu Forums

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Ubuntu Specialised Support > Development & Programming > Programming Talk
Register Forum Information Ubuntu Community Today's Posts Search

Notices
Problem logging in?
Please click here for a workaround.

Programming Talk This forum is for all programming questions.
The questions do not have to be directly related to Ubuntu and any programming language is allowed.

 
Thread Tools Display Modes
Old September 22nd, 2008   #1
Pyro.699
Ubuntu Extra Shot
 
Pyro.699's Avatar
 
Join Date: Apr 2008
Location: Fredericton, NewBrunswick
Beans: 398
Ubuntu 11.04 Natty Narwhal
Send a message via MSN to Pyro.699
[Apache] Changing user from www-data to....

Hello,

As some of you may have read in my other post, about running a java application with php (URL). In the disscussion we came to the conclusion that the reason the scripts were not working properly was that the user www-data was not running under the x display. What i would like to do is completly change over the user stats from www-data to cody. Now, before i get several people telling me the LARGE securety risks, i am well aware of the hole that this will open. This will be on a computer with absolutely no personal data on it at all, if someone hacks it, the most they could do is stop my downloads, or view my current background, so please dont inform me of that. Ive tried seatching all files for the text www-data but that took hours and only found 5 files, 1 of which were relivent. So there must be a loctaion to change the main user. Ive looked in these locations:

/etc/apache2/apache2.conf
/etc/apache2/httpd.conf
/etc/apache2/envvars
/etc/php5/apache2/php.ini

Please tell me where it is that i need to go to change the user from www-data to cody

Thanks
~Cody Woolaver
__________________
while(!(succeed = try()))

Pyro.699 is offline   Reply With Quote
Old October 13th, 2008   #2
pe7er
Just Give Me the Beans!
 
pe7er's Avatar
 
Join Date: Nov 2007
Location: Nijmegen, Netherlands
Beans: 62
Ubuntu 10.10 Maverick Meerkat
Re: [Apache] Changing user from www-data to....

Quote:
Originally Posted by Pyro.699 View Post
Please tell me where it is that i need to go to change the user from www-data to cody
It's located in /etc/apache2/envvars and you can change it with:
Code:
sudo gedit /etc/apache2/envvars
Change:
Quote:
export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data
to:
Quote:
#export APACHE_RUN_USER=www-data
export APACHE_RUN_USER=cody
#export APACHE_RUN_GROUP=www-data
export APACHE_RUN_GROUP=cody
__________________
Peter Martin - Joomla Open Source CMS specialist www.db8.nl from Nijmegen, The Netherlands
OS: Arch Linux | Arch Linux ARM | Debian | Ubuntu
Linux User Group Nijmegen http://www.linuxnijmegen.nl/
pe7er is offline   Reply With Quote
Old December 7th, 2009   #3
mnml
A Carafe of Ubuntu
 
Join Date: Oct 2007
Location: Paris
Beans: 91
Send a message via MSN to mnml Send a message via Skype™ to mnml
Re: [Apache] Changing user from www-data to....

it worked for me thanks.
mnml is offline   Reply With Quote
Old December 7th, 2009   #4
Pyro.699
Ubuntu Extra Shot
 
Pyro.699's Avatar
 
Join Date: Apr 2008
Location: Fredericton, NewBrunswick
Beans: 398
Ubuntu 11.04 Natty Narwhal
Send a message via MSN to Pyro.699
Re: [Apache] Changing user from www-data to....

Thanks for replying to a topic that is over a year old
__________________
while(!(succeed = try()))

Pyro.699 is offline   Reply With Quote
Old October 20th, 2010   #5
minhnghivn
Spilled the Beans
 
Join Date: Jul 2010
Beans: 17
Re: [Apache] Changing user from www-data to....

By the way, how can I set different RUN_USER for each vhost?
minhnghivn is offline   Reply With Quote
Old September 28th, 2012   #6
Jack Danish
First Cup of Ubuntu
 
Join Date: Aug 2012
Beans: 2
Re: [Apache] Changing user from www-data to....

I know it's an old post but thank you, exactly what I was looking for, works perfectly!

...dont forget about permissions.


Jack
Jack Danish is offline   Reply With Quote

Bookmarks


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


All times are GMT +1. The time now is 07:48 AM.


vBulletin ©2000 - 2013, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry