-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
os.access(dirname, os.W_OK) does not recognize unwriteable folders in Snapshot.delete_path.handle_error #490
Comments
This seems to be two different problems. Deleting in GUI works (the snapshot is gone) but it is still displayed in the snapshot list. Seems like the update of the list is to fast when using SSH mode. When you manually press 'Refresh Snapshot List' the snapshot should be gone in the list, too. The command |
For me it is not working at all the GUI, on restarting BIT the snapshot is still there and the files are still on the destination.
When I look at the permissions on that file through the mount point in the error I see
but when I look at it directly on the server I see
The original file is user:user I guess that this may be to do with the fact that the user and group ids do not match between the client and server. |
The BIT mounts the remote path with Could you please check the remote filesystem for errors? E.g. |
I am confident the disk is ok, and I get Looking at the enclosing folder I see |
Yes, this will cause the troubles as you need write permissions for the folder to delete a file. If you run BIT without Can you please post the full output of |
I should have posted that in the first place. I don't see any reference to the find command in the output, has it missed it for some reason?
|
Oh, okay. You're talking about deleting a folder inside a snapshot. I thought it's about removing a whole snapshot. I was able to reproduce this and will have a look into it. Thanks for reporting |
No, I am deleting a whole snapshot, though deleting it will involve deleting folders. |
I took a new snapshot (call this s1), added a file and took another snapshot (s2) then added another file and took another snapshot (s3). I then tried deleting s2, but got effectively the same message as before (for the same file but for the snapshot I am trying to delete (output pasted below). I assume it is trying to unlink the tree from the snapshot, but it does not appear to have set the permissions first. If it would be useful I am probably competent to hack extra diagnostics into the source. |
Having taught myself a little python I have instrumented snapshots.py#delete_path as in the attached file delete_path_py.txt and the result of trying to delete the snapshot is in delete_path_log.txt I am just off to work out how to display the folder permissions in python and will add that in. |
Some results that look strange to me, with my limited knowledge.
and |
I have replaced, in snapshots.ph, the line |
At the start of delete_path, stripping to trailing "/" from full path, so the line
becomes
seems to fix the problem removing the directory "backup", and it appears that the snapshot is successfully removed. At the end it pops up a confusing dialog: |
and
The delete button on Snapshot dialog is to delete a file or folder inside one or more snapshots. If you want to delete the whole snapshot use the This will call
I'm also not sure why Thanks for debuging. We already have three bugs in here 🙈 I'll split this up |
Yes, you are right I see now, sorry for the confusion. I said at the start there may well be operator error involved. I was confused by the fact that if you click on a snapshot in the snapshots dialog it enables a button "delete", but I now see what it does. That also explains why after deleting '/' the folder for the snapshot is not deleted, though interestingly those empty snapshots do not appear in the main window any more. Recreating the 'backup' folder that it originally failed trying to remove makes them appear again. |
And if nothing else, I have learned some python :) |
I just tried this local
and after mounting through sshfs
So Just found this on os.access documentation:
|
I removed the whole |
I am a new user so apologies if this is operator error.
Using Ubuntu 15.10 with BIT 1.1.8 from stable ppa and gnome UI or command line I am unable to delete a snapshot. From the UI I click Snapshots icon, select the one to be remove and click Delete and it just returns immediately to the snapshots dialog with no sign that anything is happening. The display is not greyed and even though I left it 30 minutes the snapshot was not deleted.
From the command line I ran
I expected this to prompt for which one to delete but I see
If I select a particular one to delete I see
The snapshots list ok, and everything else seems ok.
The text was updated successfully, but these errors were encountered: