I know that using sudo chmod 777 /folder will set a particular permission to /folder, but it will not do the same with subfolders and subfiles inside the folder.

Is there a terminal command to propagate permissions inside the folder?


You have to use -R option to make the command recursive:

sudo chmod -R 777 /folder
| improve this answer | |
  • That will also change permissions of every file within folder and its sub-folders. The method to only change permissions on the folder and its sub-folders would be find folder -type d -exec chmod 777 {} + – fd0 Jun 5 '15 at 12:33
  • Seems that is what the OP wants... Read carefully: "with subfolders and subfiles inside the folder". – jherran Jun 5 '15 at 12:35
  • Yep, I need to read more carefully though it is not a good idea to set the executable bit on a regular file. – fd0 Jun 5 '15 at 12:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .