[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Umask 002 policy



Clive Menzies wrote:
> For existing directories: $ chmod -R 775 should do the trick
That will work for the directories themselves, but all files in them will be
executable.

I wrote a (very basic) bash script that will recursively make normal files one
permission and directories another.[1] Just download it, look at the code to
make sure it doesn't screw anything up, chmod +x it (make sure one of the
EXCLUDE regexes matches the file you download so it doesn't change it's own
permissions), and run it like this: ./perm_set /home/`id -un`

Another way to do it is chmod -R u+rw,g+rw,o-w

[1] http://code.eth0.is-a-geek.org/perm_set/perm_set

-- 
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GAT/CM$/CS>$/CC/IT$/M/S/O/U dpu s+:++ !a C++$>C+++$
UB+++>++++$L++++$*-- P+>++$ L+++(++++)$ E-(---) W+++>$ N(+) o? K-
w--(---) O? M V? PS++@ PE-@ Y+@ PGP++(+++)>$ t? 5? X? R tv--(-)
b++(+++)@ DI? D? G e->++++ h* r? z*
------END GEEK CODE BLOCK------

David Mandelberg
mandelbergd@eth0.is-a-geek.org

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: