View previous topic :: View next topic |
Author |
Message |
eponymous Tux's lil' helper
Joined: 02 Feb 2005 Posts: 141
|
Posted: Fri Mar 09, 2012 12:09 pm Post subject: Automounted USB drive is owned by root and not writable |
|
|
Hi,
I've created an ext3 parition on a USB flash drive using:
Code: | mkfs.ext3 /dev/sdc1 |
I then plug the drive in and it gets mounted to /media automatically but for some reason has the following privileges so I can't write to it as a normal user:
Code: | drwxr-xr-x 3 root root 4096 Mar 9 10:18 CZILLA_IMAGES |
Does anyone know how to get it to mount so that I can write to it as a normal user?
Thanks. |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 23071
|
Posted: Fri Mar 09, 2012 11:46 pm Post subject: |
|
|
chown my-user /media/CZILLA_IMAGES? |
|
Back to top |
|
|
cach0rr0 Bodhisattva
Joined: 13 Nov 2008 Posts: 4123 Location: Houston, Republic of Texas
|
Posted: Sat Mar 10, 2012 6:32 am Post subject: |
|
|
if youre talking in general about getting usb drives to mount so that theyre writeable by an ordinary user, id look to fstab or udev (depending on if you want it automounting or not)
'man mount' and a bit of trawling through udev rule examples should get you started _________________ Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash |
|
Back to top |
|
|
SamuliSuominen Retired Dev
Joined: 30 Sep 2005 Posts: 2133 Location: Finland
|
Posted: Sat Mar 10, 2012 8:42 am Post subject: |
|
|
Hu wrote: | chown my-user /media/CZILLA_IMAGES? |
You read my mind. Since EXT is *nix filesystem the permissions should be retained in any case (automounted or not) |
|
Back to top |
|
|
VoidMage Watchman
Joined: 14 Oct 2006 Posts: 6196
|
Posted: Sat Mar 10, 2012 3:38 pm Post subject: |
|
|
Unless I'm reading the initial post wrong, it's a different problem:
'/media/<whatever>' (where <whatever> is usually the label) is created upon automount.
However, the OP should mention their desktop env or at least the program used for automount.
If it's again consolekit case, 'ls -l /dev/sdc1' and 'getfacl /dev/sdc1' is of interest, probably the output of 'udisks --mount /dev/sdc1' (while still unmounted, obviously) too.
On a semi-related note: is ext3 a good idea for a flash drive ? |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 23071
|
Posted: Sat Mar 10, 2012 6:39 pm Post subject: |
|
|
Even if the directory is only present when the drive is attached, the ownership and permission of the mountpoint are determined by the ownership and permission of the root directory in the mounted filesystem. Thus, it is correct for the directory to be root:root when nothing is mounted, but there is no value in having write permission there if the stick is not mounted. If the stick is mounted, then it will use the data from the mounted filesystem. |
|
Back to top |
|
|
|