If a directory /foo/bar/baz
has 700 (rwx------
) for its permissions, thereby making it inaccessible to all but its owner (and the superuser), does it matter what the "group" and "other" permissions are for the directories and files under /foo/bar/baz
?
What motivated this question is that I noticed that the files
/root/.bashrc
/root/.profile
in a freshly-installed Debian system have 644 (rw-r--r--
) as their permissions. I would have expected 600 (rw-------
) instead. But then I realized that /root
itself has permission 700. This made me wonder whether a 700 permission of a directory would render moot the g- and o- permissions of anything under it.
(If the answer is "no", i.e., if the g- and o- permissions of the contents still matter even when a component along the path has 700 permissions, then I'd like to know if there's any reason not to change the permissions of the files above to 600.)