Ask Your Question
0

Permission management on external hdd on ext4 [closed]

asked 2011-10-01 14:12:19 -0500

Jitesh Shah gravatar image

updated 2011-10-02 00:40:55 -0500

Hey, so I bought a portable 1TB external Hdd and put ext4 on it. Now the problem is this: whenever I write anything to this drive on my laptop, each file is stamped with the owner as myself and perms which don't include world writability. (eg. 0660)

If I plug-in this drive in another machine with completely different users, they can't write to it, because the created directories don't have write permission for their user ids. Vice-versa, if they write with sudo, I have to jump through hoops (go to terminal and sudo) to erase their files.

My question is: is there a simple way to avoid all these permission issues so that managing external drives is easier?

UPDATE: I wanted a non-windows fs in the first place to make it hard to plug it in on a windows machine. I am tired of reformatting the drive everytime it gets infected by a virus.

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by zoltanh721
close date 2014-07-04 22:25:44.213882

6 Answers

Sort by ยป oldest newest most voted
0

answered 2013-12-30 06:19:14 -0500

pmvelu gravatar image

I have recently installed fedora 19. My usb harddisk (1TB) is detected and automounted in /run/media/username/ExpansionDrive. Everything is fine upto this.

But all the files are having only -rw------ permissions. I am unable to change permission using chmod. Because of this I am able to delete and add files but unable to execute any script. I could'nt find any entry in /etc/fstab file for this external harddisk

edit flag offensive delete link more
1

answered 2011-10-02 06:56:03 -0500

shanks gravatar image

updated 2011-10-02 06:59:56 -0500

Try setting acl to allow all as follows:

# setfacl -m d:u::rwx,d:g::rwx,d:m:rwx,d:o:rwx /media/your-mount-dir
# setfacl -m u::rwx,g::rwx,m:rwx,o:rwx /media/your-mount-dir
edit flag offensive delete link more
0

answered 2011-10-01 16:43:58 -0500

I know of no simple way to handle your case. Is ext4 a hard requirement? Perhaps you could format the drive with a filesystem that has no fine grained permissions or concepts of ownership, like say vfat. Then it should mount on each box as the active console user and let them do whatever they like with the content.

edit flag offensive delete link more
0

answered 2011-10-01 20:07:41 -0500

The IceMan Blog gravatar image

you can use NTFS (better for big files supports) and remount the drive.

edit flag offensive delete link more
0

answered 2013-04-04 09:09:26 -0500

anurag gravatar image

updated 2013-04-04 09:10:18 -0500

Try after mounting #chown -R user.group filesystem name

edit flag offensive delete link more
0

answered 2011-10-04 04:58:10 -0500

msava gravatar image

When this particular issue occurs I only do:

$ sudo chown -hR user /media/dir
edit flag offensive delete link more

Question Tools

Stats

Asked: 2011-10-01 14:12:19 -0500

Seen: 4,573 times

Last updated: Dec 30 '13