Mailinglist Archive: opensuse (3441 mails)

< Previous Next >
Re: [opensuse] Correct Way to Recursively Change Permissions
  • From: Angel Alvarez <clist@xxxxxx>
  • Date: Wed, 14 Jan 2009 02:39:23 +0100
  • Message-id: <200901140239.23977.clist@xxxxxx>
El Miércoles, 14 de Enero de 2009 Henare Degan escribió:
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?

find <path> -type f -print0 | xargs -0 -l1-n1 chmod -c u=rw



No lea este correo si no es necesario. El buen ambiente está en nuestras manos.
Clist UAH a.k.a Angel

Hoy no has conseguido la iluminación divina. No importa mañána será otro día...
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >