# Automounted USB drive is owned by root and not writable

## eponymous

Hi,

I've created an ext3 parition on a USB flash drive using:

```
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:

```
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.

----------

## Hu

chown my-user /media/CZILLA_IMAGES?

----------

## cach0rr0

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

----------

## SamuliSuominen

 *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)

----------

## VoidMage

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 ?

----------

## Hu

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.

----------

