You are not logged in.

#1 2010-11-22 11:30:05

yatohese
Member
Registered: 2010-10-30
Posts: 18

External HDD - Permissions

Hello everyone,

I share an external hdd and the files on it with a lot of people. What ails us: the whole permission mumbo-jumbo.
Is there a way to automatically strip all permissions (or like chmod 777) and the ownership from a the file, when it's copied to the ehdd?

Thanks!

Offline

#2 2010-11-22 13:07:25

FarmerF
Member
From: Netherlands
Registered: 2009-06-08
Posts: 76

Re: External HDD - Permissions

You need to be a bit more specific.

- If you copy to the disk by attaching it directly you can change the umask value in your fstab.
- Do you share it as a windows share? Then you can change the create mask values in your samba.conf.

This should cause new files to have the permissions you specify.

If anything is unclear i am willing to explain but let me know what you are trying to do.

Last edited by FarmerF (2010-11-22 13:08:32)

Offline

#3 2010-11-24 09:00:54

yatohese
Member
Registered: 2010-10-30
Posts: 18

Re: External HDD - Permissions

Thank you!

The disk gets attached to multiple computers, physically.
fstab should work only locally?

Offline

#4 2010-11-24 12:41:44

BaconPie
Member
Registered: 2010-08-11
Posts: 209

Re: External HDD - Permissions

fstab works locally, so you just change the ftab on all the computers.

However when I had my HDD formatted as NTFS with Windows all of the permissions where drwxrwxrwx anyway.

Offline

#5 2010-11-25 15:53:34

FarmerF
Member
From: Netherlands
Registered: 2009-06-08
Posts: 76

Re: External HDD - Permissions

As BaconPie said, change the fstab of every computer that connects to the drive.

create a line for your usb drive or add to the existing line _one_ of the following in the options column:
dmask=0222,fmask=0333
umask=0222
uid=1000,gid=1000 (check with the 'id' command that this matches your user and group id)

You might also want to add the option 'user' to allow you to mount and unmount that drive without being root.

Lastly, you are able to write to the drive right? Else see https://wiki.archlinux.org/index.php/NTFS_Write_Support

Offline

#6 2010-12-02 14:42:04

yatohese
Member
Registered: 2010-10-30
Posts: 18

Re: External HDD - Permissions

Thank you for your help and patience! Unfortunately xfs does not support umask/fmask/dmask or uid/gid as mount options sad

(I'm basically able to mount and read/write to the hdd.)

Offline

#7 2010-12-03 01:03:40

rwd
Member
Registered: 2009-02-08
Posts: 664

Re: External HDD - Permissions

Do you have a specific reason to use xfs? Why not use a filesystem with more mount options such as  ext4?

Offline

#8 2010-12-03 12:31:36

yatohese
Member
Registered: 2010-10-30
Posts: 18

Re: External HDD - Permissions

Yes, XFS is a requirement. I'm experimenting with ACL, but I think there is no way to specify a default owner ...

Offline

Board footer

Powered by FluxBB