You are not logged in.

#1 2008-05-08 06:55:22

Misbah
Member
Registered: 2008-02-27
Posts: 218

changing permissions on external usb hard drive

This is similar to the other thread about USB hard drive permissions, but I didn't want to hijack.

I just got the USB drive working, as root I can read and write to it.
As user it still automounts, but I don't have read write permissions. Here's some output:

[ali@misbarch ~]$ cd /media/disk
[ali@misbarch disk]$ ls -l
total 16
drwx------ 2 root root 16384 2008-05-08 01:14 lost+found

The permissions tab in properties of /disk show:
Owner: root (root)
Access: Read & Write
Group: root
Access: Read only
Others: Read only

So I want to change "Others" to read and write also. I'm not very good with the chmod numbers, I've read the man page, but is that how I would do this? Would a simple

chmod 777 -R /media/disk

be advisable? Or is that just a bad work around and not the proper solution?

Once I got it readable, I copied the info off it as root, and I unmounted it, deleted the partition, created the partition, made an ext3 file system, all as root. Does that have anything to do with it?

Offline

#2 2008-05-08 07:05:37

stojic
Member
From: Zagreb, Croatia
Registered: 2008-02-24
Posts: 51

Re: changing permissions on external usb hard drive

There is a slightly better solution: change the group of /media/disk to storage, change permissions to 775 and add users that need to be able to write to disk to the storage group (you need to log out and log in that users before changes are visible).

So, as root:

# chgrp storage /media/disk
# chmod 775 /media/disk
# gpasswd -a user_name storage

This way everyone will be able to read the disk, but only root and users in storage group will be able to write to it. Still, if you want everyone to be able to read/write, chmod 777 is a good solution.

Offline

#3 2008-05-08 07:56:27

synthead
Member
Registered: 2006-05-09
Posts: 1,337

Re: changing permissions on external usb hard drive

YEAH!!!!! OH MAN!!!! HOLY CRAP!!!! YESSSSSSSSSSSSSSSS

I love it when this kind of shit gets worked out, I've been trying to do the same for months!!  Time to [solve] my thread ... THANKS THANKS THANKS

Offline

#4 2008-05-08 08:09:23

Misbah
Member
Registered: 2008-02-27
Posts: 218

Re: changing permissions on external usb hard drive

stojic wrote:

There is a slightly better solution: change the group of /media/disk to storage, change permissions to 775 and add users that need to be able to write to disk to the storage group (you need to log out and log in that users before changes are visible).

So, as root:

# chgrp storage /media/disk
# chmod 775 /media/disk
# gpasswd -a user_name storage

This way everyone will be able to read the disk, but only root and users in storage group will be able to write to it. Still, if you want everyone to be able to read/write, chmod 777 is a good solution.

Nice solution, thanks, I'm already added to the group storage, but media/disk wasn't part of storage, it was part of root! Thanks for the solution and suggestions.

Offline

#5 2008-05-22 19:12:34

jpt
Member
From: Rochester, NY
Registered: 2008-04-28
Posts: 31
Website

Re: changing permissions on external usb hard drive

So, I'm having the same problems it seems you guys were.  The fix isn't working for me though, as when I run:

# chgrp storage /media/disk

It tells me the operation isn't permitted.  I'm running it as root however...

Edit:
So, I've  been playing around with this, logging in as root instead of sudo or su, and I think it's the drive itself giving me issues.  As root I can't change the permissions in any way, be in with the thunar permissions window or with chgrp.  When I do try and edit it, It tells me that the files in the drive aren't permitted to be altered.  Which is why I'm thinking its the drive itself or the files in it.

Anyways, any ideas here?

Last edited by jpt (2008-05-22 22:06:02)

Offline

#6 2011-12-17 12:59:25

erken
Member
Registered: 2011-01-08
Posts: 4

Re: changing permissions on external usb hard drive

Digging up a dead thread, but it might be useful for other people experiencing the same problem so...

@jpt, I was experiencing the same problem as you were describing. The solution to this is to first add support for the NTFS file system. So in a terminal as root type:

pacman -S ntfs-3g

You will then be able to follow the 3 simple steps given by Stojic in order to be able to read/write a mounted disk. Namely:

# chgrp storage /media/disk
# chmod 775 /media/disk
# gpasswd -a user_name storage

Hope this helps!

Offline

#7 2011-12-17 13:27:09

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: changing permissions on external usb hard drive

Hello erken! Thanks for your efforts. However, this thread is really old and digging it up is not really worthwile. Just keep to our Forum Etiquette on Necro-Bumping.

By the way, have a look at the wiki. It is all in there.

Closing.


To know or not to know ...
... the questions remain forever.

Offline

Board footer

Powered by FluxBB