Forum Moderators: phranque

Message Too Old, No Replies

file permissions for newly created uploaded files

         

mikeintj

7:00 pm on Jan 6, 2007 (gmt 0)

10+ Year Member



Hi

I am developing a website that allows users to upload files and then view them, however all the newly created files that have been uploaded have default permissions of -rw-------, when I would like them to have -rw-rw-rw-. I do not see where I can change the (umask?) setting on my Apache/Ubuntu setup. Any help?

Thanks from a Linux newbie.

StupidScript

11:59 pm on Jan 8, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



How are the uploads being accomplished?

If it is via 'standard' FTP, then you can assign a default umask in the FTP server config, most likely.

If it is via a script (like PHP), then you can perform the appropriate chmod command once the file has been moved from its temporary space to its 'real' space.