LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-03-2010, 04:13 PM   #1
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720
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?
 
Old 03-03-2010, 04:44 PM   #2
troop
Member
 
Registered: Feb 2010
Distribution: gentoo, arch, fedora, freebsd
Posts: 379

Rep: Reputation: 96
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.
 
Old 03-03-2010, 05:05 PM   #3
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Original Poster
Rep: Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720
Quote:
Originally Posted by troop View Post
Don't get it.
Think chmod a-x -R directory, just without making the subdirectories un-list-able.
 
Old 03-03-2010, 05:22 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
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.
 
Old 03-03-2010, 05:49 PM   #5
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Original Poster
Rep: Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720
@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.
 
Old 03-03-2010, 06:11 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
In that case:
Code:
find -type f -exec chmod a-x {} \;
 
Old 03-03-2010, 08:11 PM   #7
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Original Poster
Rep: Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720
Quote:
Originally Posted by Tinkster View Post
In that case:
Code:
find -type f -exec chmod a-x {} \;
Works great!

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Directory Permission riganta Linux - Newbie 6 05-24-2007 06:20 AM
directory permission leprkhn Linux - Newbie 6 05-02-2007 08:30 PM
directory permission Drunkalot Linux - General 1 07-05-2005 02:05 AM
Two groups that have different permission to the same directory - it's possible? immer Linux - Newbie 7 10-22-2004 06:00 AM
Permission for directory absolut Linux - Newbie 2 01-19-2004 05:38 AM


All times are GMT -5. The time now is 11:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration