We first noticed the problem when Lisa opened Aperture and couldn't import pictures into our (supposedly) shared library. I then noticed that the thumbnails were being re-generated over and over...almost like they weren't being saved to disk. These two things led me to permissions which led me to enabling ACLs and writing this script. It seems so obvious and simple now, but my lack of Mac OS X knowledge made this a slow process.
Doug
A special thanks to SubEthaEdit for the auto-HTML-coloring of my script for me!
#!/bin/bash
# A script to set ACL permissions recursively
# Created by Doug Clark on Dec 23, 2006
# for the purpose of setting up the shared aperture library
# change dirs if non-empty param
if [ -n "${1}" ]
then
cd $1
fi
echo WARNING: This script will recursively modify all ACLs in the path $PWD
echo Please verify this is correct.
echo Press Ctrl-C to abort, enter key to continue.
read
# set the delim to new line, otherwise filenames with
# spaces would cause a problem
IFS=$'\n'
for file in `find $PWD`
do
echo Updating \"${file}\"
chmod +a "lisa allow list,add_file,search,delete,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity,writesecurity,chown,file_inherit,directory_inherit" $file
chmod +a "doug allow list,add_file,search,delete,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity,writesecurity,chown,file_inherit,directory_inherit" $file
done
2 comments:
Good job, Doug!
1. Cut a hole in a box
2. Put your junk in the box!
Post a Comment