Mailinglist Archive: opensuse (3441 mails)

< Previous Next >
[opensuse] Correct Way to Recursively Change Permissions
  • From: "Henare Degan" <henare.degan@xxxxxxxxx>
  • Date: Wed, 14 Jan 2009 12:21:53 +1100
  • Message-id: <c2afca990901131721y58cf3e3bm2b808bef6808079d@xxxxxxxxxxxxxx>
Hi list,

I want to change permissions on a large directory structure to only RW
for the owner of all the files. If I:

chmod -R 600 /path/of/directory

it won't work because it removes the 'x' bit from the directory, which
prevents traversal. The only solution I've come up with is to:

chmod -R 700 /path/to/directory

and then:

chmod 600 `find /path/to/directory -type f`

Which seems like a round-about way to achieve this (and needs some
hackery it you have messy file names, like ones with '-' in the path),
what's the "correct" way?


To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >