I have a perl script that I run as root which needs to
move a file from where it is to another directory.

        I keep getting the "Usage"  help message and a
permission denied. If I su to root and manually make the move,
it works.

        The perl script is not trying to run suid to root. I am
root when I call it. The line in question reads:

system(
"mv $directories$filename \"$directories\"deleted_keys/"
);

$directories and $filename are correctly set at the time. The
output from the script is:

usage: mv [-f | -i | -n] [-v] source target
       mv [-f | -i | -n] [-v] source ... directory
/var/named/etc/namedb/dynamic/okstate.edu/deleted_keys/: Permission denied

As I said, it works if I become root and manually move the file
in question.o
This is basically a script for moving expired dnssec keys out of
the directory and in to a morgue of dead keys which we will keep
around if there is trouble-shooting to be done later.

The script, when run, is owned by root and run by root.

        Any explanation is appreciated since this isn't making
sense right now.

Thank you.

Martin McCormick

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to