766 versus 666 Permissions on an Upload Directory

2.9k Views Asked by At

Is 766 permissions okay for a directory where my website users can upload images to?

I using 766 because when I set the directory to 666, the script returns an error and the file is not uploaded. Please is there any explanation for this?

Thanks

1

There are 1 best solutions below

3
On BEST ANSWER

Yes, 755 is the way to go because the User need the execute flag to enter the directory.

Edit

Same issue with 766 if the Web user is either Group or Others. 6 = read/write and lack the execute flag.

So 766 wont work if the web server is not the owner of the directory.