Does "chmod 777 .* -R" chmod parent directories (..)?

Does chmod 777 .* -R change the mode of parent directories (..) recursively?


Solution 1:

Yes. (Learned it the hard way.)

Solution 2:

yes.

The use of a recursive option(-r) with a wildcard(*) is almost always a bad idea.

if you were trying this:

user@box path/$ foo -r .*

which probably means you also did this first, before realizing it missed hidden files:

user@box path/$ foo -r *

most likely what you wanted to do is

user@box path/$ cd ..
user@box $ foo -r path/

furthermore, chmod 777 is always a bad idea.

Solution 3:

Use .??* instead.