LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 08-11-2004, 04:07 PM   #1
NonSumPisces
Member
 
Registered: May 2004
Location: Västerås, Sweden
Distribution: Slackware Current
Posts: 228

Rep: Reputation: 30
rox + recursive permission change for FILES only?


To my understanding, you have to have execution permission to browse directories, true?
I want some of my user accounts to be able to browse and read a couple of dirs and their content, but rox won't recognize files for what they are if they have exec perms (ie, click an avi, nothing happens if it's got exec perm). Can anyone explain to me how I can use chmod recursivly so that only the dirs them selves are executable, but not the files in them, or vice versa, remove the exec perms for the files in all subdirs without changing any perms for the dirs themselves? I don't want to have to go through 220 gig of swag dir by dir you know
 
Old 08-11-2004, 04:13 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
I don't know about ROX, but the commandline ... :)

find /<startdir> -type d -exec chmod a+x {} \;
find /<startdir> -type f -exec chmod a-x {} \;



Cheers,
Tink
 
Old 08-11-2004, 05:05 PM   #3
NonSumPisces
Member
 
Registered: May 2004
Location: Västerås, Sweden
Distribution: Slackware Current
Posts: 228

Original Poster
Rep: Reputation: 30
Thx, that's what I meant Sorry for not being clear in what I meant, I'm a bit tired, dug a three feet deep, six by six feet wide hole in the garden two hours ago
 
Old 08-11-2004, 05:10 PM   #4
NonSumPisces
Member
 
Registered: May 2004
Location: Västerås, Sweden
Distribution: Slackware Current
Posts: 228

Original Poster
Rep: Reputation: 30
Quite creative using find in conjunction with chmod. Can you explain the syntax to me?
 
Old 08-11-2004, 05:55 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Heh ... a man find would have done ;)

Code:
find -type <x> -exec <any command> {} \;
     xxxxxxxxx xxxxx               xxxxx  
     |          |                  |
lets you speci- |-------------------
fy what you're  |
after, d = dir, |
f = ordinary    \exec lets you execute
file, man for    arbitrary commands with the
more ;)          found files. You can use anything
                 you can do from a command-line there.
                 {} is the placeholder for the found
                 file. \; tells find that this is where
                 exec stops.

Cheers,
Tink
 
Old 08-11-2004, 06:14 PM   #6
NonSumPisces
Member
 
Registered: May 2004
Location: Västerås, Sweden
Distribution: Slackware Current
Posts: 228

Original Poster
Rep: Reputation: 30
Hehe, thx. As I said, I'm tired, didn't think of that :P

Cheers.
 
Old 08-11-2004, 06:36 PM   #7
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally posted by NonSumPisces
Hehe, thx. As I said, I'm tired, didn't think of that :P
That's an explanation, not an excuse ;)

Btw, I never knew that Sweden uses imperial
measures! :)


Cheers,
Tink
 
Old 08-11-2004, 07:04 PM   #8
NonSumPisces
Member
 
Registered: May 2004
Location: Västerås, Sweden
Distribution: Slackware Current
Posts: 228

Original Poster
Rep: Reputation: 30
Hehe, I wasn't looking for an excuse About that measurement system: We use the metric system, as most of the rest of europe do I used the imperial system now because if my memory doesn't fail me, most commonwealth countries still use it (NZ is short for New Zeeland and is part of the commonwealth, right? I'll feel very stupid if I'm wrong ^_^ ) Besides, I've spoken with many people from countries which still uses the imperial system, mostly americans, and I once got the question "how many millimmeters is there in one centimeter?". Before I could answer, another american jumped in and said, and I quote: "One centimeter is aprox. 10 millimeters, +/- a few"... Then a german quickly replied, and again I quote: "One centimeter is PRECISELLY 10 millimeters, nothing more, nothing less. This is why the metric system is so superior to your obsolete system, we don't have to fight about who's got the longest 10 inch pecker "


Last edited by NonSumPisces; 08-11-2004 at 07:05 PM.
 
Old 08-11-2004, 07:10 PM   #9
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally posted by NonSumPisces
I used the imperial system now because if my memory doesn't fail me, most commonwealth countries still use it (NZ is short for New Zeeland and is part of the commonwealth, right? I'll feel very stupid if I'm wrong ^_^ )
Heh ... well, I'm not quite sure which bit you were referring
to when you said "I'll feel very stupid if I'm wrong ^_^ )" ...
NZ (New Zealand) is indeed part of the commonwealth, but
we (along with the majority, including the UK to the best of
my knowledge) have switched to the metric system a while ago :)



Cheers,
Tink

P.S.: Just to be fair: many Kiwi's still talk about their height
and weight in feet and stone ;)
 
Old 08-11-2004, 07:21 PM   #10
NonSumPisces
Member
 
Registered: May 2004
Location: Västerås, Sweden
Distribution: Slackware Current
Posts: 228

Original Poster
Rep: Reputation: 30
Hehe, alrighty then, I'm just a little bit stupid But just to be just a little bit more fair than that, when I was in the UK last time, they used "miles", "yards", "ounces" and the lot
Guess some people are just stuck in the old system, though the mteric system is the official one
What's that proverb? "You can't teach an old dog to sit"?
Sweden used to have a sort of commonwealth a century or so ago too It was called "The Kalmar Union" after the Swedish city in which the the treaties were signed. That was, ofcourse, before the Finns got "stolen" from us by the Russians and the Norwegians got all separatist 'n stuff
I think the commonwealth is quite cool, espicially the yearly sports championchips between the armed forces of the commonwealth countries
 
  


Reply



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
chmod recursive on files on dlublink Linux - Newbie 6 03-02-2005 08:45 AM
how to change exisitng files/directory permission from 755 to 770 mweil Linux - Newbie 3 07-01-2004 10:18 AM
recursive checking and log files (tripwire) wedgeworth Linux - Security 2 05-28-2004 12:20 PM
recursive change of permissions Meta42 Linux - Newbie 8 03-27-2004 04:41 PM
recursive file permissions does not change new files in same directory PAB Linux - Newbie 2 03-08-2004 12:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:09 PM.

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
Open Source Consulting | Domain Registration