Page 1 of 1

Cant delete folders from share

Posted: Tue Dec 28, 2010 1:03 pm
by klauswirn
Hi,

my problem is that i cant delete from my second movie share (called "movs1").

I always get "permission problems" even when im logged in as root.

Is it possible to delete the files and folders directly in the "gh" folder from the files in the storage pool?
I dont wanna use this share any longer and so all in there and the share itself can be deleted.

Is there an workaround???

Re: Cant delete folders from share

Posted: Fri Dec 31, 2010 3:42 am
by klauswirn
Found out that the folders have different rights.

The "movs1" folder which i want to delete has uid=1000 and gid=1000
on the path /var/hda/files/movs1
and in all gh pathes (/var/hda/files/drives/drive4/gh/movs1)

The correct working folders and shares have other uid and gid.

Can i change the uid and gid manually without getting a disaster on
/var/hda/files/drives/drive4/gh/movs1
/var/hda/files/drives/drive5/gh/movs1
and
/var/hda/files/drives/drive6/gh/movs1

or what can i do?

Re: Cant delete folders from share

Posted: Fri Dec 31, 2010 5:42 am
by NeverSimple
The correct owner & group are probably your first admin user and group is 'users'.

you can check this by doing:

Code: Select all

ls -l /var/hda/files
Notice the owner & group for shares that work correct

You can change ownership of the directory by doing (in a terminal as 'root'):

Code: Select all

chown klauswirn:users /var/hda/files/movs1
(or admin:users or whatever you called yourself)

Since you are using greyhole, in this folder there should only be symlinks, no real files. Again, you can check by using ls -l (links start with l). These links are owned by root:root, because greyhole runs as root. because of the latter I don't think it really matters who owns the folders on the pool drives, but you can change these the same way.

When you have access to the 'movs1' share delete the files in the normal way, by using a client pc. Greyhole should take care of removing the files from the pool drives. you can check this by tail -f /var/log/greyhole/log. This will give you a 'live' view of the logfile so you can see what greyhole is doing.

When greyhole is done (and the share is empty) delete it from the dashboard.

bottom line: recreate access to the share and after that use it in a normal way. Preferrably don't handle the folders on the server directly.

Richard

Re: Cant delete folders from share

Posted: Sat Jan 01, 2011 11:55 am
by gboudreau

Code: Select all

chown -R 500:100 /var/hda/files/drives/drive*/gh/movs1
Replace 500 with the correct uid (or username), and 100 with the correct gid (or group name).
The retry deleting the files using the share.

Re: Cant delete folders from share

Posted: Sun Jan 02, 2011 4:48 am
by klauswirn
Thanks 4 reply,

now i can remove the files in the folder. trying to delete a folder directly wont work. the message "cant delete folder because its not empty" appears.

But the deleted files dont be removed.
Greyhole.conf says "Failed unlink in movs1/foldername/filename..... Skipping" and the files are back.

Whats my problem?

Re: Cant delete folders from share

Posted: Sun Jan 02, 2011 5:03 am
by klauswirn
Sry my fault.

Forgott to change the folders owner. Now everything works fine and i can delete the files.

THX