You are not logged in.

#1 2010-04-09 09:16:04

falsum
Member
From: Calgary - Canada
Registered: 2010-03-04
Posts: 38

[SOLVED] setting up permissions for mounted usb devices

Hi all,

I've been having the following problem when mounting my external hd: in order to mount the external hd I created a folder /mnt/usbstick/ giving permissions to a non-root user to read the files/directories in this folder (using chmod); however, after I mount the external hd, the set of permissions for /mnt/usbstick/ change so that a non-root user cannot  read the mounted files in /mnt/usbstick. This is a problem for me because, when I copy a file from the external hd to the non-root home folder, the copied file can only be read by the root user.   

Do you know how I can solve this problem? Should I write a udev rule and place it at /etc/udev/rules.d/? Or should I simply add the non-root user to a specific group from /etc/group? Any ideas?

Thanks!

Last edited by falsum (2010-05-08 09:21:59)

Offline

#2 2010-04-09 09:52:58

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [SOLVED] setting up permissions for mounted usb devices

I'd suggest pmount.

Offline

#3 2010-04-09 16:27:14

browndwarf
Member
From: Virginia, USA
Registered: 2010-02-02
Posts: 7

Re: [SOLVED] setting up permissions for mounted usb devices

You could try adding an entry for your usb device in /etc/fstab and specify the option user to let non-superusers mount it.
Here's an example of an entry for my external HD. I'm sure there are probably other (and better) ways to do this but it works for me.

UUID=4376-0BFB          /media/FIRELITE  vfat   rw,user,noauto,async    0       0

Nice howto found on the wiki: http://wiki.archlinux.org/index.php/Fstab

Offline

#4 2010-04-09 23:21:55

falsum
Member
From: Calgary - Canada
Registered: 2010-03-04
Posts: 38

Re: [SOLVED] setting up permissions for mounted usb devices

In fact pmount is a sweet utility. Thanks tomk for suggesting it.  I was trying to edit my fstab file adding the option rw as browndwarf suggested. But mounting with pmount or fstab was still not allowing me to write on my usb device. But I finally discovered a solution to the problem. This is not going to make me sound very smart but I've recently realized I didn't install a driver for writing on NTFS fillesystems (my external hd uses NTFS). In my case I installed ntfs-3g. Now everything works perfectly (with pmount or with fstab).

Offline

Board footer

Powered by FluxBB