[PLUG] Preventing writing to a mount point

Michael M. Moore michael at writemoore.net
Thu Jun 25 21:38:56 UTC 2009


On Thu, 2009-06-25 at 12:18 -0700, Keith Lofstrom wrote:
> > On Wed, 2009-06-24 at 19:55 -0700, Keith Lofstrom wrote:
> > > 
> > > Alternative (2), of course, is to locate the programmer who
> > > thought it was a good idea to automatically create a directory
> > > on a mount point without checking.  Then gently flog them -
> > > unless, of course, they enjoy floggings.  If rdiff-backup calls
> > > chattr -i to remove immutable bits before creating directories,
> > > you have my permission to strap them to a chair and play Slim
> > > Whitman's "Indian Love Call" until their head explodes.
> 
> On Thu, Jun 25, 2009 at 08:06:02AM -0700, Michael M. Moore wrote:
> > But I already checked that.  With nothing mounted under /media:
> > 
> > mcubed at drifter:~$ rdiff-backup /home/mcubed /media/disk/test
> > Fatal Error: Unable to create directory /media/disk/test
> > 
> > rdiff-backup doesn't automatically create a directory on a mount point
> > when that mount point isn't writable, or doesn't exist.
> 
> Michael, did you try that as root?  John wants to do full system
> backups running as root.  The error message says "Unable to create",
> which may be due to user mcubed having insufficent permissions to
> write to the root-owned directory /media.  Root faces no such limitation.

Ah, no I did not ... I did see this in the man page, however:

        --create-full-path
        
        Normally only the final directory of the destination path will
        be created if it does not exist. With this option, all missing
        directories on the destination path will be created. Use this
        option with care:  if  there is a typo in the remote path, the
        remote filesystem could fill up very quickly (by creating a
        duplicate backup tree). For this reason this option is primarily
        aimed at scripts which automate backups.

"Normally only the final directory of the destination path will be
created" implies that if your target is /media/disk2/backup,
and /media/disk2 is not mounted, then rdiff-backup will fail because it
won't create the full path.

-- 
Michael M.




More information about the PLUG mailing list