[SATLUG] cron sudo task
esanchezvela.satlug at gmail.com
Tue Jan 25 12:38:53 CST 2011
On Tue, Jan 25, 2011 at 12:08 PM, Richard Suberg <rsuberg at satx.rr.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
> I have a task that is scheduled with cron and it runs the task,
> however, since it mounts a remote ftp server into the filesystem (and
> I haven't figured out the parameters for fstab) for it to actually be
> productive and mount it needs to be run root. I can manually run the
> task as sudo and it completes ok, but how can I cron the sudo run of
> the very same script without needing a password? I know running an ftp
> update script (or any script) as root is not the best security
> practice, but it is the only way I have found to accomplish this.
> Unless someone has a better suggestion, the process involved is:
> 1- mount ftp server into filesystem
> 2- cp -uRv location from (1) into a folder on my computer
> 3- umount remote ftp server.
I don't get the "mount ftp server into fileystem" part..
Are you trying to replicate whatever files are located in the FTP
server to your local computer? have you tried to run rsync, scp or
Enrique Sanchez Vela
More information about the SATLUG