permission of script linked to cron
I have a script, ~/scripts/backup, owned by root, that mounts an
external UPS drive, creates a directory based on date, and backs up my
hard disk with the exception of a few directories.
I created a symlink to /etc/cron.weekly to automate the job, but
because the script is located in user's directory, it runs with user's
permission, and much of the backup has "permission denied".
So I tried to start the script with this snippet:
  pw=<password>
  sudo
  echo $pw
which does not work. I have several questions:
a) Why does a script owned by root and run by root lack root's
permission just because it is in user's directory?
b) Why does the script snippet above not work?
c) How can I do what this script snippet intends without exposing my
plain text password?
-- 
 
       Haines Brown, KB1GRM
	 
        
Reply to: