You are not logged in.
Hello, I have an external USB drive NTFS formatted where most of my music is stored as I'm using it for backing purposes and I need Windows compatibility.
I have setup MPD, being the library directory in the USB drive. When I tried to update the library it won't even start looking for files, so I looked if I could read the contents of that dir as mpd which turned out to a gracefully message telling me that user doesn't have the appropriate permissions:
sudo -u mpd ls /media/Iomega\ HDD/Music
ls: cannot open directory /media/Iomega HDD/: Permission denied
The USB drive was automounted when I plugged it in the computer (it's not specified in fstab), so my question is, how can I change how NTFS-3G USB drives are mounted to allow access to users from the 'users' group?
Thank you very much for your time.
P.S.: By the way, my DE is Gnome in case that matters.
Last edited by MickST (2010-06-08 17:41:04)
Offline
in your /etc/fstab:
/dev/sdX1 /whereever ntfs-3g defaults,noauto,uid=0,gid=0,umask=000,locale=en_US.utf8 0 0
or mount it in /etc/rc.local
#... snip
iomega_uuid="............"
dev=`blkid | grep "$iomega_uuid" | cut -d ':' -f 1`
test "x$dev" = x || mount -t ntfs-3g -o rw,uid=0,gid=0,umask=000,locale=en_US.utf8 $dev /whereever
#...endsnip
Last edited by perbh (2010-06-08 01:48:02)
Offline
Thank you for the answer, but I don't want the drive to be mounted at boot time as I'm not always at home, you can think about it as a USB stick, is there a way to change automount settings or to allow other users other than the one logged in when the drive is inserted to access the partition?
Maybe it's not possible what I'm trying to do..
Offline
That fstab entry should work perfectly, as the "noauto" option is specified.
Offline
It does not work, the device is not always the same (i.e. sometimes it is sdb other times it is sdc, ...).
I've seen somewhere that the default automount options were located in a gconf key: /system/storage/default_options/ntfs-3g/mount_options
But the "storage" one doesn't exist in mine, so they're not there. Where are they then? And why the default settings doesn't allow all users access to external NTFS-3G drives?
Offline
Give the volume a label or call it by UUID?
Offline
I guess this is where polkit comes in - sorry, I think the whole polkit issue is an abdomination and I try to stay away from it ...
Offline
I guess this is where polkit comes in - sorry, I think the whole polkit issue is an abdomination and I try to stay away from it ...
Agreed.
Change does not equal progress. The whole *kit debacle can be described like, "How to make something simple into something complex and convoluted in 32,768 easy steps."
Offline
Give the volume a label or call it by UUID?
Thank you! But I'm afraid that the fstab entry doesn't work. I have changed to an UUID scheme and tried some different options, but with anyone of them I get an unprivileged error like this:
Error mounting: mount exited with exit code 1: helper failed with:
mount: only root can mount /dev/sdd1 on /media/Iomega
I guess this is where polkit comes in - sorry, I think the whole polkit issue is an abdomination and I try to stay away from it ...
Agreed.
Change does not equal progress. The whole *kit debacle can be described like, "How to make something simple into something complex and convoluted in 32,768 easy steps."
I don't know what polkit is, could you point me to some source of info?
Anyway if you as more experienced users try to stay away from it the sensible thing is that I do too, I may end up running mpd under my user to be able to access the files (I'm lucky that I'm the only user of this machine).
Thank you very much for your answers and time.
Offline
Please search on the Wiki. Especially the HAL page could help, I think.
I use XFCE and not Gnome, but for me what worked was to:
1) use ck-launch-session in .xinitrc (apparently you don't need to if you use Gdm)
2) create (as root) the file /etc/polkit-1/localauthority/anything.conf
# Allowing everything (not recommended because of security constraints):
<match user="stqn">
<return result="yes"/>
</match>
This allowed me (if I'm not forgetting anything) to mount USB disks with Thunar, and also reboot/shutdown without password.
Offline
****ing HAL, why do people have to do things this complicated?!
After struggling with HAL and PolicyKit all afternoon I came up with nothing but the knowledge of HAL and PolicyKit being nothing worth to care, so I'm giving up. Is it so difficult for the developers to think of a user mounting an USB drive and allowing its use for the other users of the system? What if I had several users in my machine and all of them were willing to use the same drive, do they have to unplug it and plug it again (so that HAL mounts it as him/her)?
God, if it doesn't even allow root to change the directory permissions! WTF is wrong with the devs of these "technologies"?
Good luck to all of you who try to solve your problems with these rules, I couldn't even modify the options it uses to mount drives.
Regarding this problem, I'm marking it as "WON'T FIX" as right now I don't feel like it's possible to automount an external drive while being readable for other users.
Thank you very much for all of your time and patience the ones who answered this thread.
Offline