0

How can I do "chmod 704" to a folder which I want it to allow others to access and download the entire folder including its sub-folders and files?

Thanks, Baha

  • 2
    always set your group value to be greater than or equal to your other argument. it can have unexpected results. Also, if you want the entire directory structure to take on these permissions, add the -R option to your chmod command. – Frank Thomas Mar 11 '16 at 23:42
1

From the looks of it, you have the permissions the wrong order. When referencing permission masks with three digits, the order is owner|group|world In other words, a 704 mask means owner gets it all (as it should be, in most cases), group members don't get anything (which I find a bit odd), and everyone else gets read only.

If you want everyone to be able to read (and hence copy) a folder of yours, including any subfolders, the folder in question should have 755, as well as any subfolders. Files should normally be 644, except from executable ones which should be 755

A lazy way of achieving what you want is chmod -R 755 /some/folder/that/you/want/to/share. This will apply a 755 to that folder, and all files and subfolders within. It has the downside of making all files executable (including the ones that shouldn't be), but in most cases this is OK and only a little bit cringeworthy.

  • Yes You are right Jarmund, thank you :)) – Baha Mar 16 '16 at 20:42

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.