I have directory which have 777 permission on it . I want every directory to have the same permission that i created in it or will create in it.
Asked
Active
Viewed 59 times
2 Answers
0
I'd do something along these lines:
find directory/subdirectory -type d -exec chmod 755 {} \;
It doesn't really make sense as to why you'd want to do it though, why would you want all the files to be executable?

Luke Garrigan
- 101
0
You can use umask 0777 to do this.

willian
- 1
-
That's quite broad, applies everywhere, and will cause problems for e.g.
ssh
and other processes that are strict about permissions. – thrig Mar 30 '17 at 01:47
default acl
on directories to have special access righs set on newly created directories. See http://unix.stackexchange.com/questions/1314/how-to-set-default-file-permissions-for-all-folders-files-in-a-directory – ridgy Mar 08 '17 at 12:08