Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

apache deault user

Status
Not open for further replies.

needahandlebad

Technical User
May 20, 2004
6
GB
hi. i am confused as to what the settings should be in httpd.conf in relation to users/groups. At the moment, it is set as:

User nobody
Group nobody

the reason i ask, is that i am having a problem with cms that needs to upload pictures to a writable folder. When files are uploaded, they are taking on permissions of nobody:nobody, instead of owner:eek:wner. Where can i start to trouble shoot this? many thanks

Apache 1.3.37 (unix)
PHP 4.4.7
Perl 5.8.7
 
Are files being uploaded via FTP or some other process than Apache script? That would explain the problem.

If a user "A" logs into the machine under FTP/SFTP and deposits files somewhere, more than likely the ownership of the files will be A:A (user:group).

If, however, a script running under apache is accepting uploaded files, the default name will be nobody:nobody, BUT the script can potentially modify that ownership.



D.E.R. Management - IT Project Management Consulting
 
Since it won't make sense to change the user:group that apache runs as, you can change the permissions on that directory and its sub-directories to let others read and write to it by issuing this command:

chmod -R 777 /path/to/directory

 
thanks for reply. a user creates an account then uploads pics into gallery via script. what is strange is that the folder they upload to is username:username and 777 the files take on nobody:nobody and therefore do not display.
 
Either your script is configured to do this or the sticky bit is set in your file permissions. Run the chmod command again but this time instead of 777 use 0777.
 
I'd be very afraid having anything on the web server with wide open perms (777). Send me the URL to your web site, and I'll show you why *** LOL - just kidding!

On our servers running as nobody, we set our files to 464 (r--rw-r--) and nobody:GROUP -- where GROUP are the folks who maintain those files (where the Web Dept or other). The parent directory will usually be 575 (r--rw-r--) and nobody:GROUP. (We--the Web Dept--do have sudo on our web servers, so we can correct issues.)

We have cronjobs to ensure nothing goes to 777 and notes other things that look astray.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top