Ability to run Anacron as a user

Scott Haneda talklists at newgeo.com
Tue Jun 2 13:47:51 PDT 2009


On Jun 2, 2009, at 1:31 PM, John J. Foster wrote:

> I've got a TrueCrypt volume that I would like to rsync changes to over
> an SSH connection daily. I've set up a script that works fine for me
> from the command line. However, I can't get this to work with anacron
> because I do not have, and do not want to put,  roots ssh public key  
> on
> the remote server. I tried to configure the anacrontab file to use  
> su to
> accomplish this, but it looks like my local user does not have write
> capability to the anacron spool directory. Digging online shows that  
> it
> is possible with some versions on anacron to run it under users
> credentials and to use the command line option -S to specify a  
> different
> spool, ideally in $HOME. But this option isn't available in macports
> anacron. Does anyone have any ideas here?


Perhaps you may want to ditch anacron, and look into launchd?  Lingon  
can be used, I believe, in the same way to shied you from the  
intricacies of OS X scheduling.

If you are able to run interactively your rsync script, which I assume  
asks you for a password to login, then anacron, or launchd are both  
going to need keys on the server no matter what.

Somewhere, you have to have the keys to do a passwordless login.  If  
your machine is compromised, you can always revoke the keys quickly.   
Reading a little about anacron, I can not see there being anything  
launchd can not do, and much more.

Curious also, make sure you use rsync correctly, if you are syncing  
mac files, there are special flags you need to add in order to not  
nuke your Mac OS X resource/data forks, thereby breaking your files  
and having an incomplete backup.

Hope this is a little helpful, not entirely the answer you were after,  
but something I think in the end you will be more happy with.
-- 
Scott * If you contact me off list replace talklists@ with scott@ *



More information about the macports-users mailing list