[nycphp-talk] Uploaded file permissions
Hans Zaunere
lists at zaunere.com
Mon Apr 4 08:00:43 EDT 2005
> I¹d like to override the default uploaded file permissions, so that my
> backup script can read them. For example, when I upload a file it¹s owned by
> apache, with read/write for the owner only. Ideally, I¹d like to allow read
> by everyone, or set the group owner to backup, with read permission.
>
> Of course, I could do the chmod/chown stuff, but it seems like there¹s a php
> setting someplace that I can tweak.
>
> Any ideas?
This is always a sticky area. In my opinion, there is no good way to do this. Typically, system backups run as root, so permissions in this case aren't a problem. If the backup isn't running as root, then it might be best to use the correct combination of group permissions (ie, having the files group readable and the backup script being in the same group as the web server). Changing permissions and ownerships via a web server is always a scary proposition.
H
More information about the talk
mailing list