You are not logged in.

#1 2010-06-08 01:09:17

MickST
Member
Registered: 2010-02-26
Posts: 54

["WON'T FIX"] How to allow other users to access a NTFS USB drive?

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

#2 2010-06-08 01:45:12

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: ["WON'T FIX"] How to allow other users to access a NTFS USB drive?

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

#3 2010-06-08 08:47:09

MickST
Member
Registered: 2010-02-26
Posts: 54

Re: ["WON'T FIX"] How to allow other users to access a NTFS USB drive?

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

#4 2010-06-08 09:10:32

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

Re: ["WON'T FIX"] How to allow other users to access a NTFS USB drive?

That fstab entry should work perfectly, as the "noauto" option is specified.

Offline

#5 2010-06-08 11:16:38

MickST
Member
Registered: 2010-02-26
Posts: 54

Re: ["WON'T FIX"] How to allow other users to access a NTFS USB drive?

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

#6 2010-06-08 11:22:45

Runiq
Member
From: Germany
Registered: 2008-10-29
Posts: 1,053

Re: ["WON'T FIX"] How to allow other users to access a NTFS USB drive?

Give the volume a label or call it by UUID?

Offline

#7 2010-06-08 13:18:36

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: ["WON'T FIX"] How to allow other users to access a NTFS USB drive?

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

#8 2010-06-08 13:50:06

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: ["WON'T FIX"] How to allow other users to access a NTFS USB drive?

perbh wrote:

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

#9 2010-06-08 14:40:12

MickST
Member
Registered: 2010-02-26
Posts: 54

Re: ["WON'T FIX"] How to allow other users to access a NTFS USB drive?

Runiq wrote:

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
perbh wrote:

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

Misfit138 wrote:

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

#10 2010-06-08 14:57:45

stqn
Member
Registered: 2010-03-19
Posts: 1,191
Website

Re: ["WON'T FIX"] How to allow other users to access a NTFS USB drive?

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

#11 2010-06-08 17:40:31

MickST
Member
Registered: 2010-02-26
Posts: 54

Re: ["WON'T FIX"] How to allow other users to access a NTFS USB drive?

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

Board footer

Powered by FluxBB