Forum Moderators: phranque

Message Too Old, No Replies

ownership problems on script created files and directories

owner, directories, apache

         

thedark1

6:55 pm on Jun 21, 2008 (gmt 0)

10+ Year Member



I recently upgraded to apache 2 and php 5.26 on a vps server, and everything seemed to go well. later on however, i discovered that a php script which enables users to upload their pictures, was creating directories and files with an ownership different to the webuser account. On ftp owner was showing as 99, ssh showed the owner as nobody which i suspect means the default apache user.

consequently this meant that the photos could not be viewed by users, or deleted via ftp, this ownership issue wasn't there before so what caused it and how to fix it?

thanx

jdMorgan

3:21 pm on Jun 22, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Your best bet is to ask your host, since server configurations vary.

You have a choice here which affects security, so be careful: It's likely your script can be set to run as the webuser or as the account which started Apache. The latter may expose you to exploits, so I'd avoid that.

I'm not very good on these issues -- Perhaps a search on "suexec" with "web" and "script" and "owner" might be helpful.

Jim