topical media & game development
basic-shell-05-lockdown.sh / sh
# Locks down file permissions.
for filename in *
do
# Initialize all permissions.
r=""
w=""
x=""
# Check to preserve existing permissions.
if [ -r filename ]
then
w="w"
fi
if [ -x x,g-rwx,o-rwx
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.