I am creating a site that users can upload images to and I am not sure what the best permissions would be? I was going to use 0777 but decided that was a very bad idea after reading some of the other questions on here.
What would be the best permission value to use to allow users to upload files without compromising security?
Also, is there a way of changing the permissions recursively so the subfolders are changed at the same time? One of the user contributed notes on php.net suggests using chmod_R but it doesn’t seem a value command?
Thanks
The permissions should be sufficient for the webserver to write to it.
So change the directory ownership to the webserver user and the possible permissions can be even
0700To change permissions recursively use