LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Directory permission questions (https://www.linuxquestions.org/questions/linux-newbie-8/directory-permission-questions-792967/)

MTK358 03-03-2010 03:13 PM

Directory permission questions
 
I was wondering what is the difference between directory execute and read permission?

Also, how do I recursively remove executable permission from a dir, but just apply it to normal files?

troop 03-03-2010 03:44 PM

http://www.zzee.com/solutions/linux-permissions.shtml
see 3. Difference in access permissions for files and folders

Quote:

Also, how do I recursively remove executable permission from a dir, but just apply it to normal files?
Don't get it.

MTK358 03-03-2010 04:05 PM

Quote:

Originally Posted by troop (Post 3884519)
Don't get it.

Think chmod a-x -R directory, just without making the subdirectories un-list-able.

Tinkster 03-03-2010 04:22 PM

It works the other way (making dirs "executable" and leaving files alone
Code:

chmod -R a+X  ...
Maybe a-X will do the reverse? Haven't tried it.

MTK358 03-03-2010 04:49 PM

@Tinkster

No, I was unable to cd into the directory after I did that. Running a+X made it back the way it was, though.

Tinkster 03-03-2010 05:11 PM

In that case:
Code:

find -type f -exec chmod a-x {} \;

MTK358 03-03-2010 07:11 PM

Quote:

Originally Posted by Tinkster (Post 3884656)
In that case:
Code:

find -type f -exec chmod a-x {} \;

Works great!

Finally I got the photos copied from Windows non-executable!


All times are GMT -5. The time now is 06:03 PM.