Bug 456813 - Backup ends on unsuccessful "chmod".
Backup ends on unsuccessful "chmod".
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: fwbackups (Show other bugs)
9
i686 Linux
low Severity medium
: ---
: ---
Assigned To: Stewart Adam
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-07-27 12:08 EDT by petko
Modified: 2008-10-20 18:16 EDT (History)
0 users

See Also:
Fixed In Version: fwbackups-1.43.2-1.fc9
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-10-19 11:31:42 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description petko 2008-07-27 12:08:21 EDT
:fwbackups version 1.43.2rc3:
PERSONAL MESSAGE:
-----------------
Thank you very much for truly great piece of software.


DESCRIPTION:
------------
Backup ends with: :: ERROR : An error occurred while running a subprocess!
- However file is in place and looks intact (it can be opened and files are in
there, size looks ok as well.
- It looks like everything is fine until fwbackups tries to chmod target backup
file.

The reason for this to fail is that I backup to (despite local) NTFS partition
which does not support chmod.

What I did was commenting out this:
""" if self.destinationType == 'local':
os.chmod(self.dest, 0711)
"""

... and backups work ok then.


SOLUTION:
---------
I would suggest to try chmod and continue in backup even if it is not successful.
Either way, current behaviour is not ok, because file stays in place with
original permissions (as chmod failed).
If you want emphasize security then delete file after failure or if you dont
then let backup task continue even after unsucessful chmod.


LOG INFO:
---------
čec 27 17:13:33 :: INFO : Starting automatic backup operation of set `workspace'
čec 27 17:13:33 :: INFO : Using tar.gz: Must backup all paths at once - Progress
notification will be disabled.
čec 27 17:13:33 :: DEBUG : Backing up path 1/1: m
čec 27 17:13:33 :: DEBUG : Running command: nice -n 0 tar cfz
'/home/petko/_backup/Backup-workspace-2008-07-27.tar.gz' '/mnt/win_d/workspace'
čec 27 17:13:33 :: DEBUG : Starting subprocess with PID 16984
čec 27 17:15:23 :: DEBUG : Subprocess with PID 16984 exited with status 0
čec 27 17:15:24 :: ERROR : An error occurred while running a subprocess!
čec 27 17:15:24 :: DEBUG : Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/fwbackups/__init__.py", line 170, in run
    retval = self.__functorun(*self.__args)
  File "/usr/lib/python2.5/site-packages/fwbackups/backend.py", line 850, in backup
    os.chmod(self.dest, 0711)
OSError: [Errno 1] Operace není povolena:
'/home/petko/_backup/Backup-workspace-2008-07-27.tar.gz'

čec 27 17:15:24 :: DEBUG : Thread returned with retval None
Comment 1 Stewart Adam 2008-07-28 20:01:57 EDT
Is the NTFS drive mounted manually, and if so with what options? I just tried
with a drive automounted using NTFS-3G and the backup executed without errors. 

Nonetheless, a backup shouldn't halt if only the chmod failed - I've added a
try-except-pass to the next version so if it fails, a warning is issued but
nothing more.
Comment 2 petko 2008-07-29 04:37:19 EDT
Its mounted using /etc/fstab with:
UUID=uuid /mountpoint ntfs defaults,umask=0002,gid=500 0 0

this is from 'mount' command:
type fuseblk (rw,allow_other,default_permissions,blksize=512)

I expect it is using ntfs-3g, but to be honest, I do not know how to find out
exactly.

Thanks for your reply and solution.
Comment 3 Stewart Adam 2008-07-29 18:21:19 EDT
It looks like you're using the kernel-based ntfs driver in that case - it's no
solution to be bug, if you'd like for it to be mounted in userspace (as in each
user can automount the drive on login), just remove that from the fstab and
reboot. NTFS-3G doesn't seem to fail on a chmod, even though the chmod will do
nothing because NTFS doesn't support unix style permissions.
Comment 4 petko 2008-07-29 18:57:29 EDT
Ok, thanks once again, Hopefully I will try that some day, but for now I will
rahter stay with how it is, because it just works and thats exactly what I need
from my system. :-)
Thanks for your advice though.

Enjoy your holiday... ;-)
Comment 5 Fedora Update System 2008-10-02 13:15:27 EDT
fwbackups-1.43.2-1.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/fwbackups-1.43.2-1.fc9
Comment 6 Fedora Update System 2008-10-03 18:32:18 EDT
fwbackups-1.43.2-1.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update fwbackups'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-8583
Comment 7 Fedora Update System 2008-10-19 11:11:43 EDT
fwbackups-1.43.2-2.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/fwbackups-1.43.2-2.fc9
Comment 8 Fedora Update System 2008-10-20 18:16:05 EDT
fwbackups-1.43.2-2.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.