[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [K12OSN] Permissions?
- From: "Dan Young" <dan_young parkrose k12 or us>
- To: <k12osn redhat com>
- Cc: <jamie staff newberg k12 or us>
- Subject: Re: [K12OSN] Permissions?
- Date: Wed Apr 30 18:15:06 2003
jamie said:
> I need for the ownership of the
> files to be the same as the directory I am copying them into.
Eric Harrison wrote this. Works like a champ.
-Dan Young
-Parkrose School District
#!/bin/sh
# a quick and dirty script to reset user/group ownership of files
# in /home
cd /home
DIRS="`ls | grep -v samba`"
for DIR in $DIRS
do
if [ -d $DIR ]
then
U="`id -u $DIR`"
G="`id -g $DIR`"
if [ "$U" -a "$G" ]
then
chown -Rv ${U}:${G} $DIR
else
echo "PROBLEM with $DIR"
fi
fi
done
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]