I do backups about once a month, or so, and burn them to CD. (Also works for moving lots of data between distros as well). Here's a convenient script for setting up permissions and ownership in those cases: <pre> #!/bin/sh

#------------------------------- FileChanger.sh --------------------------------

#*********************************************************************** # - Description # ------------------- # Begin : 23 March, 2003 # Copyright : (C) 2003 by Joe T. Penrod # E-Mail : <a href="mailto:jtpenrod@xxxxxxx.com"><a href="mailto:jtpenrod@xxxxxxx.com"><a href="mailto:jtpenrod@xxxxxxx.com"><a href="mailto:jtpenrod@xxxxxxx.com"><a href="mailto:jtpenrod@xxxxxxx.com">jtpenrod@xxxxxxx.com</a></a></a></a></a> # Version : 1.0.3 # #**********************************************************************/ # #*********************************************************************** # * * # * This program is free software; you can redistribute it and/or modify * # * it under the terms of the GNU General Public License as published by * # * the Free Software Foundation; either version 2 of the License, or * # * (at your option) any later version. * # * * # * * # * If software can be free, why can't dolphins? * # * * # #***********************************************************************

# A shell script for changing the ownership and permissions on # files/directories. Run this as superuser, give the path as: # /dir/to/process # #------------------------ Functions 'n' Subroutines -------------------------- # # Name: Useage # # Type: Subroutine # # Parameters: (none) # # Note: Print out application help

Useage() { echo -e "\nRun application with these command line options:" echo -e "\n FileChanger /path/to/directory OwnerName:GroupName\n" echo -e "\n FileChanger --help for app help" echo -e "\nThe leading '/' is required, regardless of your working directory" echo -e "No other options available, and the above are mandatory\n" echo -e 'Note: Must be "root" to run this app\n' }

#------------------------------------------------------------------------------ # # Name: RootTest # # Type: Subroutine # # Parameters: (none) # # Note: Test to see if the user is also the superuser

RootTest() { if test `whoami` != "root" then

echo "" echo "You aren't root. You can't run this program successfully" echo 'Log-in as "root" and run it again' echo "" exit 1

else

echo "" echo "Superuser status verified. Program continuing" echo ""

fi }

#------------------------------------------------------------------------------- # # Name: Die # # Type: Subroutine # # Parameters: Msg # # Note: Print out app failure message; exit on error

Die() { local Msg=$1

echo -e "\nOperation Failed: $Msg" echo -e "\nCheck permissions: you may not have write permission on these files/directories\n" exit 1 }

#------------------------------- Main Program ---------------------------------

Opts=$*

for Option in $Opts do case $Option in /* ) Path=$Option;;

*:* ) Owner=`expr "44$Option" : "44\(.*\):.*"` || Die 'Invalid owner name'

Group=`expr "44$Option" : "44[^:]*:\(.*\)"` || Die 'Invalid group name';;

--help | -help | -h )

Useage

exit 0;;

* ) Useage

exit 1;;

esac done

RootTest

for File in `ls $Path` do if test -f "$Path/$File" then

chown -v $Owner:$Group "$Path/$File" || Die 'Bad path and/or permissions' chmod -v 664 "$Path/$File" || Die 'Bad path and/or permissions'

elif test -d "$Path/$File" then

chmod -v 755 "$Path/$File" || Die 'Bad path and/or permissions' chown -Rv $Owner:$Group "$Path/$File" || Die 'Bad path and/or permissions'

else

echo -e "/nWarning: $File isn't a directory or file"

fi

done

exit 0

#------------------------------- FileChanger.sh -------------------------------- </pre> I usually put it in /usr/sbin. Be NBD to simply copy and paste in another text file, and make it executable. Lots faster than doing this manually, or via point 'n' click file manager.


For more help, ask us at Newbies Linux Forum