Page 1 of 1

File upload permissions problems

Posted: Tue Feb 07, 2006 11:45 am
by vakantieman
Hello,

We have recently moved to a Redhat EL 4 server with Plesk 7.5.4. Since the movement we have a lot of permissions problems. Files uploaded with a script gets the user/groep apache/apache and a chmod of 600.

This is not good i think so, the ftp user of that domain can't download the files that are uploaded.

Files are uploaded via FTP are getting the good permissions and the correct user and group. So I think it's a PHP or Apache problem.?

Any suggestions?

Posted: Tue Feb 07, 2006 12:50 pm
by scott
That is the expected behavior for apache. In the context of a php app, it runs as the uid apache, and gid apache, so files and directories will be created as that user.

Posted: Tue Feb 07, 2006 2:31 pm
by vakantieman
Ok that's good then. But the files are chmod to 600. Is this also right?
Where can you set the rights for new uploaded files?

Posted: Tue Feb 07, 2006 2:47 pm
by scott
You can set that in your php code.

Posted: Tue Feb 07, 2006 3:03 pm
by vakantieman
That's for me a solution. But i can't tell my customers that they must do that in the scripts. Is there a server-wide solution?

Posted: Mon Feb 13, 2006 7:18 pm
by strolfey
I've been having this problem also, and after searching around, it seems like suphp is the best way to make it work without having to deal with apache/apache or 777 permissions.

I didn't get it working yet myself, but it does seem like the best way to go.