On Tue, Jul 15, 2003 at 11:02:39PM -0400, MJM wrote:
> On Tuesday 15 July 2003 22:02, Michael Heironimus wrote:
> <snip>
> > > but when I tested out the "tar cf /home/desirebackup/home_backup.tar
> > > /home/desire/piers" I get a lot of "Permissions denied" errors although
> > > some files are read OK. (An example is "tar: /home/desire/piers/.mcoprc:
> > > Read error at byte 0, reading 31 byes: Permission denied")
> >
> > It looks like you're using root to run your backup. Normally root is
> > remapped to nobody ("root squashing") on NFS mounts for security
> > reasons, so root won't have permission to read files that aren't
> > world-readable. In the /etc/exports file on the server you can add the
> > no_root_squash option to allow root access on an exported filesystem.
> > See the man page on exports for details.
> 
> I logged in as root and tried to write to a directory on an NFS partition 
> owned by account1 and got a permission error.  Then I did "su account1" and 
> was able to write to the partition.  Then I did "exit" and was no longer able 
> to write the partition.  Can the su command be used in the cron script to 
> accomplish the tar-up and keep the root-squash in effect?

You could probably do that with su -c, or there may be an option to tell
cron to use an alternate user for that entry (I'm not current on what
Debian's version of cron supports, it's not exactly a typical UNIX
cron). If you're only running a backup of one user account's home
directory you could also put the tar command in that user's crontab
instead of a system-wide one. Or you could run tar through rsh or ssh.

-- 
Michael Heironimus


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to