I have one directory called apps/cache. When a script writes some files to that directory those files are owned by the nobody user. Of course, then those files and folders are not editable by any user.

Is there any way that I can change the user nobody?

link|improve this question
feedback

3 Answers

Use suEXEC within Apache to run your scripts as an appropriate user.

Also, consider learning a lot about setuid. A lot.

link|improve this answer
I did that chmod g+s directory. Now what that did is make the new folders with group of the cache directory. Then i tried umask 002 cache so that i can get default group write permission. But its not doing that – user1094163 Jan 9 at 5:14
@user1094163 Do you want to change how apache behaves in the first place, or try and get the situation as it stands now to work? The answer I gave is to make apache and scripts behave better, but not how to get things to work now that the folder and files are under the nobody user. – WesleyDavid Jan 9 at 6:14
Thats apache thing is looking bit tough for me. can you solve my current problem as per now – user1094163 Jan 10 at 7:30
feedback

Check your configuration (apache) for the directive User. This is where you set the user apache starts and operates in the first place.

link|improve this answer
feedback

check these variables in your configuration folder and change accordingly

x@x:~$ grep www-data /etc/apache2/ -R
/etc/apache2/envvars:export APACHE_RUN_USER=www-data
/etc/apache2/envvars:export APACHE_RUN_GROUP=www-data
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.