Mikeboz... this is how SUID works.
lets say you have a script that you want people to execute. The script will perform some actions on the system that regular user does not have permissions to... when you set permission to the script and you give it a '4' before the perms it will set an SUID which means that whoever will execute the script it will always run as the owner of the script. best command to look at as an example is a 'passwd' command on UNIX. when you change your own passwd it modifies /etc/passwd ( if you're not on a trusted system ). Now you as a regular use can't modify /etc/passwd.. you can only read it.. how does this work ? 'passwd' is owned by root. and has a SUID set.. which means when you run it to modify the passwd it is actually ran as root and therefore has enough previliges to modify /etc/passwd.
Getting back to your original request.
if you decide to use SUID,
#!/usr/bin/ksh
SECURE_DIR="/path/to/secure/dir"
if [ "$#" -ne 1 ]
then
echo "Must move one file at a time\n"
exit 1
else
FILE_TO_MOVE=$1
fi
if [ ! -f "$FILE_TO_MOVE" ]
then
echo "$FILE_TO_MOVE does not exists.. check path and try again\n"
exit 1
else
/usr/bin/mv $FILE_TO_MOVE $SECURE_DIR
MOVE_STATUS=$?
if [ "$MOVE_STATUS" -ne 0 ]
then
echo "Move was not successful\n"
else
echo "Successfuly moved the $FILE_TO_MOVE to $SECURE_DIR\n"
fi
fi
==================================================
as you can see.. this is the most basic version of the move script which will run a couple of checks. 1. Make sure one argument is supplied when the script is ran. 2. Make sure the file exists before we try to move it. 3. make sure the 'mv' command didn't produce any errors. this is just an example.. you might wonna write your own and make sure that it works and does all the proper checks.
Now, as I have posted on my first reply.. SHELL SCRIPTS ARE NOT SECURE. any bad user who knows enough about scripts and shells, can make some damage, but I don't know your environment and maybe you're not too concerned with security...
I hope this post clarifies some things for you.
Good luck,
Steve