0

I just unpacked a tar file with a folder in it. I did a tree -F and saw asterisks popping everywhere. All of the files (even png, txt, etc) were marked as executable. So I did what any sensible human being would.

chmod 640 **

None of the files were supposed to be executable anyways...

But now, when I do tree -F, it won't descend into dirs anymore. It will only print the items in the current dir, even though there are items inside the folders.

Not sure why this is going on, any help is appreciated.

I'm using tree 1.7.0 installed with homebrew on OSX

1 Answer 1

0

The executable permission on a folder grants you the right to enter that folder. You need to add the executable permission back on all folders.

2
  • I did not know that at all! Now this got me wondering what would be a good one-liner for setting permissions only to the folders of a directory...
    – user308285
    Feb 14, 2015 at 22:22
  • found it chmod -R 740 * && chmod 640 $(find . ! -type d)
    – user308285
    Feb 14, 2015 at 22:29

You must log in to answer this question.