Page 1 of 1

File Permissions, Unable to delete, Failed to unlink

Posted: Wed Dec 01, 2010 6:09 am
by wiredfutureman
Hi all,

Got a weird problem where I am unable to remove files and folders from a share. The error simply says that they are owned by root and cannot be deleted.

For example, I remove a text file and greyhole.log shows this:

Code: Select all

Dec 1 13:04:31 7 parse_logs: Failed unlink in Backups/Lightroom/SyncToy_1864e9a9-7494-4d1d-aad1-71eb58c36d7b.dat. Skipping. Dec 1 13:04:32 7 simplify_tasks: Simplifying pending tasks. Dec 1 13:04:32 7 write: Now working on task ID 2443149: write Backups/Lightroom/SyncToy_1864e9a9-7494-4d1d-aad1-71eb58c36d7b.dat Dec 1 13:04:32 6 write: File changed: Backups/Lightroom/SyncToy_1864e9a9-7494-4d1d-aad1-71eb58c36d7b.dat - 16.0B Dec 1 13:04:32 7 write: Will use source file: /var/hda/files/drives/sdd1/gh/Backups/Lightroom/SyncToy_1864e9a9-7494-4d1d-aad1-71eb58c36d7b.dat Dec 1 13:04:32 7 write: Loading tombstones for Backups/Lightroom/SyncToy_1864e9a9-7494-4d1d-aad1-71eb58c36d7b.dat... Got 2 tombstones. Dec 1 13:04:32 7 write: Saving 2 tombstones for Backups/Lightroom/SyncToy_1864e9a9-7494-4d1d-aad1-71eb58c36d7b.dat Dec 1 13:04:32 7 write: Saving tombstones in /var/hda/files/drives/sdd1/gh/.gh_graveyard/Backups/Lightroom/SyncToy_1864e9a9-7494-4d1d-aad1-71eb58c36d7b.dat Dec 1 13:04:32 7 write: Saving tombstones in /var/hda/files/drives/sde1/gh/.gh_graveyard/Backups/Lightroom/SyncToy_1864e9a9-7494-4d1d-aad1-71eb58c36d7b.dat Dec 1 13:04:32 7 write: File copy at /var/hda/files/drives/sdd1/gh/Backups/Lightroom/SyncToy_1864e9a9-7494-4d1d-aad1-71eb58c36d7b.dat is already up to date. Dec 1 13:04:32 7 write: Copying file to /var/hda/files/drives/sde1/gh/Backups/Lightroom/SyncToy_1864e9a9-7494-4d1d-aad1-71eb58c36d7b.dat Dec 1 13:04:32 7 write: Saving 2 tombstones for Backups/Lightroom/SyncToy_1864e9a9-7494-4d1d-aad1-71eb58c36d7b.dat Dec 1 13:04:32 7 write: Saving tombstones in /var/hda/files/drives/sdd1/gh/.gh_graveyard/Backups/Lightroom/SyncToy_1864e9a9-7494-4d1d-aad1-71eb58c36d7b.dat Dec 1 13:04:32 7 write: Saving tombstones in /var/hda/files/drives/sde1/gh/.gh_graveyard/Backups/Lightroom/SyncToy_1864e9a9-7494-4d1d-aad1-71eb58c36d7b.dat
The file above is from a sync program I'm using to keep my Lightroom folder syncronised (from workstation to amahi only). The folder I'm trying to remove, which the file is in, is my Lightroom backup with over 86GB of files.

Sadly Amahi/Greyhole won't let me delete it :( Any help in resolving this issue would be much appreciated.

Perhaps I shouldn't use sync tools like rsync or SyncToy to transfer files?

Re: File Permissions, Unable to delete, Failed to unlink

Posted: Wed Dec 01, 2010 7:55 am
by gboudreau
The greyhole log here simply tells you that Samba logged a failed rm, and thus, GH skipped it, since the file wasn't deleted for real. That's probably superfluous information for the GH log, but eh...

Using rsync or anything else to transfer files should be fine. Even if those tools tried to change the files/folders permissions remotely, they wouldn't be able to, since Samba has 'unix extension = off'.

Your problem is probably wrong permissions / ownership in your shared files/folders.
A recent GH fix should help prevent this kind of problem in the future (not yet available in Amahi; soon).

To fix, try this:

Code: Select all

chown -R your_username:users /var/hda/files/Backups/Lightroom /var/hda/files/drives/*/gh/Backups/Lightroom

Re: File Permissions, Unable to delete, Failed to unlink

Posted: Wed Dec 01, 2010 8:44 am
by wiredfutureman
Merci Guillaume!

Thought I'd ask rather than destroy tens of gigs of data ;)

Worked a charm.

Should we update GH on Amahi manually to get lastest version or wait for Amahi release?

PS: Also setting up off-site mirror on old Drobo now via rsync.

Re: File Permissions, Unable to delete, Failed to unlink

Posted: Wed Dec 01, 2010 9:01 am
by gboudreau
Amahi will take care of updating your Greyhole when new versions are available. Nothing for you to do.
The new version should be available in the upcoming days.

Re: File Permissions, Unable to delete, Failed to unlink

Posted: Wed Dec 01, 2010 9:29 am
by spliffcity
Hi guys,

Was just about to post the same problem, and hey presto problem and answer right there.

Worked like a charm!

Loving Amahi & Greyhole. Goodbye WHS / Vail... Forever!

Cheers
Mark.