# [solved] USB stick access by user

## Tony0945

When I mount a USB stick it is only accessible by root, owner=root, group= root. I swear I used to be able to access it as a member of plugdev.  I think I can change the group with a custom udev rule, but I would like to find the default rule for use as a guide.  I have examined the files in /etc/udev/rules.d and only usb cd/dvd's and printers/scanners appear, yet somehow the USB sticks mount with a name like /media/TRAVELDRIVE or /media/minidrive. I've been googling for hours but only find years old posts involving running scripts. 

Can anyone point me to the default rule for USB sticks/pendrives et cetera?

Kernel 2.6.30 (AMD64)

udev-141

hal-0.5.11-r9 

dbus-1.2.3-r1Last edited by Tony0945 on Sun Sep 06, 2009 1:36 am; edited 1 time in total

----------

## audiodef

Have you tried adding your user to the usb group?

gpasswd -a (user) usb

----------

## hielvc

Well I found a partial fix for mine. From several years ago I put in my /etc/fstab# usb mounting

/dev/sdc1		/mnt/usb1	auto		users,noauto,rw	0 0

/dev/sdc2		/mnt/usb2	auto		users,rw,noauto	0 0

/dev/sdd1        /mnt/usb3        auto        users,rw,noauto	0 0

I just "ls -l /mnt/usb*" and of course they were "drwxr-xr-x". So a chmod 777 /mnt/usb* fix that. Now I can write to usb1 with out having to sudo. 

I ls -l /media/  >>  drwxr-xr-x 16 root root 4.0K Sep  3 09:59 disk which is where my usb Maxtor HD pops up.

Same problem but how can I can the permissions on it permently?

```
groups 

wheel floppy audio cdrom cdrw usb lpadmin portage plugdev
```

Still reading file:///usr/share/doc/udev/html/writing_udev_rules.html#example-usbhdd

----------

## Tony0945

Viola!

Usb stick already mounted at boot. Opened a terminal then "su":

Casti tony # gpasswd -a tony usb

Adding user tony to group usb

Casti tony # cd /media/TRAVELDRIVE

Casti TRAVELDRIVE # ls -l

total 85856

drwxrwxrwx 2 tony root    32768 Jul  1 09:56 Money backups

-rwxr-xr-x 1 tony root 22653426 Apr 13  2008 Obama.flv

-rwxr-xr-x 1 tony root  9146792 Mar 13  2007 PortableVaultInstallerMemorexV2051.exe

-rwxr-xr-x 1 tony root 54941331 Apr 10  2008 RandiRhodes.wmv

drwxrwxrwx 2 tony root    32768 May 22 14:10 config

-rwxr-xr-x 1 tony root   917504 Sep 25  2005 dwlg810_firmware_215.bin

-rwxr-xr-x 1 tony root      627 Jun 27  2008 grub.conf

drwxrwxrwx 2 tony root    32768 Jul  8 09:45 installs

drwxrwxrwx 2 tony root    32768 May 22 14:22 specs

-rwxr-xr-x 1 tony root       56 Sep  4 18:42 sync.txt

Previously everything was "root root".

I guess the plugdev group is obsolete. Went out with hotplug?

----------

