Front page

Error when trying to backup to an external NTFS hard drive mounted via autofs

62905d5afad44224a71b52d653eb0c0c
FLAGPOLE MILLIONAIRE EXCEED

From: Thierry Rascle <thierr26@free.fr>
Date: Sun, 10 Apr 2016 17:29:57 +0200

   Hi list,
   
   I'm using Obnam 1.19.1-1 on Debian unstable.
   
   When trying to backup a few files to an external USB connected NTFS
   hard drive mounted via autofs, I get an error. Backing up the same
   files to the internal hard drive works without error.
   
   My external hard drive is mounted to /var/autofs/removable/chil.
   
   It shows up in /etc/mtab as:
   
   /dev/sdb1 /var/autofs/removable/chil fuseblk
   rw,sync,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096
   0 0
   
   It looks like Obnam succeeds in accessing the external device because
   the repository is created and contains a metadata directory with a 0
   bytes file.
   
   Here's what the log file says:
   
   2016-04-10 17:03:58 INFO obnam version 1.19.1 starts
   2016-04-10 17:03:58 INFO Backup starts
   2016-04-10 17:03:58 INFO Opening
   repository: /var/autofs/removable/chil/backup_akela_thierry_core
   2016-04-10 17:03:58 CRITICAL Caught OSError: [Errno 1] Operation not
   permitted Traceback (most recent call last): File
   "/usr/lib/python2.7/dist-packages/obnamlib/app.py", line 208, in
   process_args cliapp.Application.process_args(self, args) File
   "/usr/lib/python2.7/dist-packages/cliapp/app.py", line 589, in
   process_args method(args[1:]) File
   "/usr/lib/python2.7/dist-packages/obnamlib/plugins/backup_plugin.py",
   line 163, in backup self.start_backup() File
   "/usr/lib/python2.7/dist-packages/obnamlib/plugins/backup_plugin.py",
   line 200, in start_backup self.repo = self.open_repository() File
   "/usr/lib/python2.7/dist-packages/obnamlib/plugins/backup_plugin.py",
   line 225, in open_repository return
   self.app.get_repository_object(create=True) File
   "/usr/lib/python2.7/dist-packages/obnamlib/app.py", line 267, in
   get_repository_object repofs, self.get_default_repository_class(),
   **kwargs) File
   "/usr/lib/python2.7/dist-packages/obnamlib/repo_factory.py", line 119,
   in create_repo fs.write_file('metadata/format', '%s\n' %
   wanted_format.format) File
   "/usr/lib/python2.7/dist-packages/obnamlib/vfs_local.py", line 388, in
   write_file tempname = self._create_tempfile(pathname) File
   "/usr/lib/python2.7/dist-packages/obnamlib/vfs_local.py", line 164, in
   _create_tempfile os.fchmod(fd, obnamlib.NEW_FILE_MODE) OSError: [Errno
   1] Operation not permitted 2016-04-10 17:03:58 CRITICAL RD5FA4X: System
   error: None: 1: Operation not permitted Traceback (most recent call
   last): File "/usr/lib/python2.7/dist-packages/obnamlib/app.py", line
   217, in process_args errno=e.errno, strerror=e.strerror,
   filename=e.filename) ObnamSystemError: RD5FA4X: System error: None: 1:
   Operation not permitted
   
   Anyone understanding what the problem is ?
   
   Thanks,
   
   Thierry
   
   _______________________________________________
   obnam-support mailing list
   obnam-support@obnam.org
   http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/obnam-support-obnam.org
From: Ben Boeckel <mathstuf@gmail.com>
Date: Tue, 12 Apr 2016 21:29:06 -0400

   On Sun, Apr 10, 2016 at 17:29:57 +0200, Thierry Rascle wrote:
   > When trying to backup a few files to an external USB connected NTFS
   > hard drive mounted via autofs, I get an error. Backing up the same
   > files to the internal hard drive works without error.
   > 
   > My external hard drive is mounted to /var/autofs/removable/chil.
   > 
   > It shows up in /etc/mtab as:
   > 
   > /dev/sdb1 /var/autofs/removable/chil fuseblk
   > rw,sync,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096
   > 0 0
   
   Hmm. fuseblk? There's a native NTFS driver now isn't there? Also
   questioning that "sync" option in there. Though it doesn't seem to do
   anything for ntfs anyways:
   
       e.g., the sync option today has an effect only for ext2, ext3, fat,
       vfat and ufs
   
   > "/usr/lib/python2.7/dist-packages/obnamlib/vfs_local.py", line 388, in
   > write_file tempname = self._create_tempfile(pathname) File
   > "/usr/lib/python2.7/dist-packages/obnamlib/vfs_local.py", line 164, in
   > _create_tempfile os.fchmod(fd, obnamlib.NEW_FILE_MODE) OSError: [Errno
   > 1] Operation not permitted 2016-04-10 17:03:58 CRITICAL RD5FA4X: System
   > error: None: 1: Operation not permitted Traceback (most recent call
   > last): File "/usr/lib/python2.7/dist-packages/obnamlib/app.py", line
   > 217, in process_args errno=e.errno, strerror=e.strerror,
   > filename=e.filename) ObnamSystemError: RD5FA4X: System error: None: 1:
   > Operation not permitted
   > 
   > Anyone understanding what the problem is ?
   
   You cannot chmod things (meaningfully) on NTFS. I'd recommend using a
   different filesystem (ext4 has been working beautifully here, but I'm
   sure others have different opinions).
   
   --Ben
   
   _______________________________________________
   obnam-support mailing list
   obnam-support@obnam.org
   http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/obnam-support-obnam.org
From: Thierry Rascle <thierr26@free.fr>
Date: Sat, 16 Apr 2016 18:04:39 +0200

   On Tue, 12 Apr 2016 21:29:06 -0400
   Ben Boeckel <mathstuf@gmail.com> wrote:
   
   > On Sun, Apr 10, 2016 at 17:29:57 +0200, Thierry Rascle wrote:
   > > When trying to backup a few files to an external USB connected NTFS
   > > hard drive mounted via autofs, I get an error. Backing up the same
   > > files to the internal hard drive works without error.
   > > 
   > > My external hard drive is mounted to /var/autofs/removable/chil.
   > > 
   > > It shows up in /etc/mtab as:
   > > 
   > > /dev/sdb1 /var/autofs/removable/chil fuseblk
   > > rw,sync,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096
   > > 0 0  
   > 
   > Hmm. fuseblk? There's a native NTFS driver now isn't there? Also
   > questioning that "sync" option in there. Though it doesn't seem to do
   > anything for ntfs anyways:
   > 
   >     e.g., the sync option today has an effect only for ext2, ext3,
   > fat, vfat and ufs
   
   When I mount the drive with the mount command instead of autofs, the
   options sync, nosuid, nodev and default_permissions are absent, and
   Obnam works without error.
   
   I did some testing and the sync, nosuid and nodev options do not seem
   to cause the Obnam error. Could the default_permissions option be the
   problem ? Despite some googling I could not have autofs mount the drive
   without this option.
   
   > 
   > > "/usr/lib/python2.7/dist-packages/obnamlib/vfs_local.py", line 388,
   > > in write_file tempname = self._create_tempfile(pathname) File
   > > "/usr/lib/python2.7/dist-packages/obnamlib/vfs_local.py", line 164,
   > > in _create_tempfile os.fchmod(fd, obnamlib.NEW_FILE_MODE) OSError:
   > > [Errno 1] Operation not permitted 2016-04-10 17:03:58 CRITICAL
   > > RD5FA4X: System error: None: 1: Operation not permitted Traceback
   > > (most recent call last): File
   > > "/usr/lib/python2.7/dist-packages/obnamlib/app.py", line 217, in
   > > process_args errno=e.errno, strerror=e.strerror,
   > > filename=e.filename) ObnamSystemError: RD5FA4X: System error: None:
   > > 1: Operation not permitted
   > > 
   > > Anyone understanding what the problem is ?  
   > 
   > You cannot chmod things (meaningfully) on NTFS. I'd recommend using a
   > different filesystem (ext4 has been working beautifully here, but I'm
   > sure others have different opinions).
   
   I've tried with an ext4 formatted external hard drive and it works, so
   I will take take this route.
   
   Thanks for your help.
   
   > 
   > --Ben
   
   _______________________________________________
   obnam-support mailing list
   obnam-support@obnam.org
   http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/obnam-support-obnam.org
From: Lars Wirzenius <liw@liw.fi>
Date: Sun, 24 Apr 2016 17:30:30 +0300

   On Tue, Apr 12, 2016 at 09:29:06PM -0400, Ben Boeckel wrote:
   > You cannot chmod things (meaningfully) on NTFS. I'd recommend using a
   > different filesystem (ext4 has been working beautifully here, but I'm
   > sure others have different opinions).
   
   Hmmm. Obnam uses chmod to set the permissions of files it writes to
   the backup repository to 0600 (dirs 0700), i.e., so that only the
   owner can read and write them. This is an extra precaution and any
   errors about it not being possibly could arguably be ignored,
   allowing NTFS to be used for a backup repository.
   
   Opinions?
From: Jan Niggemann <jn@hz6.de>
Date: Mon, 25 Apr 2016 09:45:42 +0200

   Zitat von Lars Wirzenius <liw@liw.fi>:
   
   > On Tue, Apr 12, 2016 at 09:29:06PM -0400, Ben Boeckel wrote:
   >> You cannot chmod things (meaningfully) on NTFS. I'd recommend using a
   >> different filesystem (ext4 has been working beautifully here, but I'm
   >> sure others have different opinions).
   >
   > Hmmm. Obnam uses chmod to set the permissions of files it writes to
   > the backup repository to 0600 (dirs 0700), i.e., so that only the
   > owner can read and write them. This is an extra precaution and any
   > errors about it not being possibly could arguably be ignored,
   > allowing NTFS to be used for a backup repository.
   >
   > Opinions?
   If you can somehow figure out what FS we're using: Sounds good.
   Or, if that's somewhat difficult, we could have a generic option for  
   all FS that don't support permissons... like '--use-lame-fs' or sth  
   like that...
   
   jan