Reputation: 79
I have set up a client area on my website: http://samberson.co.uk/clients/
When a user uploads a file, it makes a folder, within the 'files-folder' directory.
I have set the 'files-folder' directory to have 777 permissions, however, when a new folder is made, it has 764 permissions, meaning that it messes up the PHP script (client area) and so then it doesn't display the image.
Is there a way that I can make all new files and folders within the 'files-folder' directory have 777 permissions automatically?
Upvotes: 1
Views: 1968
Reputation: 79
I found the answer our from the developer of the client area. He said to put umask(0);
in the index.php
file within the parent directory, just underneath the set_reporting
call. Thanks for all your help!
Upvotes: 0
Reputation: 76656
chmod('/home/path/directory/', 0764)
http://php.net/manual/en/function.chmod.php
Upvotes: 1