Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Does "chmod -R 700 directory_1" update directories under softlinks? Forexample, there is a softlink under directory_1 folder: "my_softlink". And my_softlink points to a directory_2.

Will permissions of directory_2's and files under it be updated to 700 when I do "chmod -R 700 directory_1"

Best Regards

share|improve this question
    
Seems like you could just try it and see... –  martineau Sep 18 '12 at 8:45
add comment

1 Answer

up vote 1 down vote accepted

From the man page:

chmod never changes the permissions of symbolic links; the chmod system call cannot change their permissions. This is not a problem since the permissions of symbolic links are never used. However, for each symbolic link listed on the command line, chmod changes the permissions of the pointed-to file. In contrast, chmod ignores symbolic links encountered during recursive directory traversals.

So the answer is, no, it will not change anything for directory_2.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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