File upload permissions problems

Support/Development for PHP
vakantieman
Forum User
Forum User
Posts: 30
Joined: Mon Jan 03, 2005 6:34 am

File upload permissions problems

Unread post 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?
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post 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.
vakantieman
Forum User
Forum User
Posts: 30
Joined: Mon Jan 03, 2005 6:34 am

Unread post 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?
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

You can set that in your php code.
vakantieman
Forum User
Forum User
Posts: 30
Joined: Mon Jan 03, 2005 6:34 am

Unread post 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?
strolfey
Forum User
Forum User
Posts: 5
Joined: Sun Feb 12, 2006 8:27 pm

Unread post 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.
Plesk 7.5.4
Fedora Core 3
Post Reply