Cant delete folders from share

klauswirn
Posts: 20
Joined: Sat Dec 18, 2010 1:27 pm

Cant delete folders from share

Postby klauswirn » Tue Dec 28, 2010 1:03 pm

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???

klauswirn
Posts: 20
Joined: Sat Dec 18, 2010 1:27 pm

Re: Cant delete folders from share

Postby klauswirn » Fri Dec 31, 2010 3:42 am

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?

User avatar
NeverSimple
Posts: 114
Joined: Sat Aug 21, 2010 4:26 pm
Location: The Netherlands

Re: Cant delete folders from share

Postby NeverSimple » Fri Dec 31, 2010 5:42 am

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

User avatar
gboudreau
Posts: 606
Joined: Sat Jan 23, 2010 1:15 pm
Location: Montréal, Canada
Contact:

Re: Cant delete folders from share

Postby gboudreau » Sat Jan 01, 2011 11:55 am

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.
- Guillaume Boudreau

klauswirn
Posts: 20
Joined: Sat Dec 18, 2010 1:27 pm

Re: Cant delete folders from share

Postby klauswirn » Sun Jan 02, 2011 4:48 am

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?

klauswirn
Posts: 20
Joined: Sat Dec 18, 2010 1:27 pm

Re: Cant delete folders from share

Postby klauswirn » Sun Jan 02, 2011 5:03 am

Sry my fault.

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

THX

Who is online

Users browsing this forum: No registered users and 26 guests