For directories (which are usually not too many):
sudo chmod 755 $(sudo find path/to/dir -type d)
for files (which are numerous):
find path/to/dir -type f -print0 | sudo xargs -0 chmod 664
Sources:
https://superuser.com/questions/91935/how-to-recursively-chmod-all-directories-except-files
https://www.linuxquestions.org/questions/linux-newbie-8/unable-to-execute-bin-chmod-argument-list-too-long-908143/
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment