You are not logged in.

#1 2006-06-29 00:11:53

hunter_d
Member
From: Chile
Registered: 2005-04-30
Posts: 15

permissions question

Hi,

How can I set permissions to all the files in a directory and it's sub directories for owner only read+write, leaving the directories with execute?

Because if I just chmod -R 600 the directories dont get execute permission so i cant access the files inside.

Any ideas?

Thanks.

Offline

#2 2006-06-29 01:03:43

rayjgu3
Member
From: Chicago IL usa
Registered: 2004-07-04
Posts: 695

Re: permissions question

checkout
chown

Offline

#3 2006-06-29 01:35:29

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: permissions question

find . -type f -exec chmod 0600 {} ;

Offline

#4 2006-06-29 04:37:33

hunter_d
Member
From: Chile
Registered: 2005-04-30
Posts: 15

Re: permissions question

thanks elastic, that worked

Offline

#5 2006-06-29 04:53:21

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: permissions question

would...

chmod go-rwx -R directory

work right?

Offline

#6 2006-06-29 21:36:54

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: permissions question

I don't think so, wouldn't that also change the sub directories permissions, not just files?

Offline

#7 2006-06-29 21:38:49

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: permissions question

elasticdog's way is how I'd do it... "find -type f" is about the only way I know to narrow that stuff down... besides some complex scripting of "ls -F" and grep "/$"... /me shrugs

Offline

Board footer

Powered by FluxBB