You are not logged in.

#1 2010-05-16 20:38:47

lamdacore
Member
Registered: 2009-11-05
Posts: 128

External HD permissions

I have an external HD split into a FAT32 and a NTFS partitions. I wanted to set the permissions so the partitions and the files were owned by my user and the "users" group and all files had rwx permissions for everyone.
Essentially the following permissions:
drwxrwxrwx username users

Now I managed to get this after a couple of tries (apparently FAT32 and NTFS handle disk permissions in a weird fashion since they do not support permissions by default).

However here is my trouble. I can not get them to mount without sudo. I want the ability to mount them as a user.

the following is my fstab:  the partitions of interest are the ones setup with the UUIDs.

#
# /etc/fstab: static file system information
#
# <file system>        <dir>         <type>    <options>          <dump> <pass>
none                   /dev/pts                  devpts   defaults                                           0  0
none                   /dev/shm                  tmpfs    defaults                                           0  0

#/dev/cdrom            /media/cd                 auto     ro,user,noauto,unhide                              0  0
#/dev/dvd              /media/dvd                auto     ro,user,noauto,unhide                              0  0
#/dev/fd0              /media/fl                 auto     user,noauto                                        0  0

/dev/sda3              /home                     ext3     defaults,noatime                                   0  1
/dev/sda4              /home/lamdacore/NTFSHome  ntfs-3g  defaults,noatime,uid=1000,gid=100                  0  1
/dev/sda5              /boot                     ext2     defaults                                           0  1
/dev/sda6              /                         ext3     defaults,noatime                                   0  1
/dev/sda7              swap                      swap     defaults                                           0  0
UUID=5C847AF5847AD14E  /media/pandora            ntfs-3g  noauto,users,uid=1000,gid=100                      0  0
UUID=489D-B57F         /media/FAT32              vfat     noauto,users,uid=1000,gid=100,dmask=000,fmask=111  0  0

This is what ls -l shows me right now:

drwxrwxrwx  1 lamdacore users  8192 May 15 16:20 pandora

Any thoughts?
Thanks!

Last edited by lamdacore (2010-05-16 20:40:31)

Offline

#2 2010-05-17 00:50:20

JackH79
Member
From: Australia
Registered: 2009-06-18
Posts: 663
Website

Re: External HD permissions

I think you've gone to way to much trouble here. If I were you, I'd have a read here:

http://wiki.archlinux.org/index.php/Beg … tup_groups

and here:

http://wiki.archlinux.org/index.php/NTFS-3G

and maybe here:

http://wiki.archlinux.org/index.php/HAL … ite_access

Offline

#3 2010-05-17 02:01:36

lamdacore
Member
Registered: 2009-11-05
Posts: 128

Re: External HD permissions

Thanks for your reply, what is a simpler way of doing what I want?

I read through the above links.
The user is in the correct groups. I have added "users" argument in the fstab which, from what I gather, allows any user to mount/dismount a partition. I am not getting a error for HAL.

I cannot mount the 2 partitions from the GUI (thunar).
I get this error:

You are not privileged to mount the volume "pandora".
You are not privileged to mount the volume "FAT32".

I can mount the FAT32 partition as user form command line.
This is the error I get when I try to do the same for the NTFS partiton.

Unprivileged user can not mount NTFS block devices using the external FUSE
library. Either mount the volume as root, or rebuild NTFS-3G with integrated
FUSE support and make it setuid root. Please see more information at
http://ntfs-3g.org/support.html#unprivileged

I am assuming I do not need to rebuild ntfs-3g. It works fine if I let the partitions default to the default permissions.

Last edited by lamdacore (2010-05-17 02:15:49)

Offline

#4 2010-05-18 11:13:58

rransom
Member
Registered: 2010-04-26
Posts: 92

Re: External HD permissions

lamdacore wrote:

I have added "users" argument in the fstab which, from what I gather, allows any user to mount/dismount a partition.

"user" not "users".  See the other /media/... fstab lines.

Offline

#5 2010-05-18 21:48:53

lamdacore
Member
Registered: 2009-11-05
Posts: 128

Re: External HD permissions

by mistake for posting it wrong.
I checked again.
i indeed have it as "user".

Offline

#6 2010-05-19 01:50:56

rransom
Member
Registered: 2010-04-26
Posts: 92

Re: External HD permissions

lamdacore wrote:

by mistake for posting it wrong.
I checked again.
i indeed have it as "user".

The fstab you pasted into your first forum post says "users".

Offline

#7 2010-05-20 05:27:20

lamdacore
Member
Registered: 2009-11-05
Posts: 128

Re: External HD permissions

I apologize, I posted it wrong earlier - I was trying a couple of permutations and it was an early backup. This is and was my fstab:

# /etc/fstab: static file system information
#
# <file system>        <dir>         <type>    <options>          <dump> <pass>
none                   /dev/pts                  devpts   defaults                                           0  0
none                   /dev/shm                  tmpfs    defaults                                           0  0

#/dev/cdrom            /media/cd                 auto     ro,user,noauto,unhide                              0  0
#/dev/dvd              /media/dvd                auto     ro,user,noauto,unhide                              0  0
#/dev/fd0              /media/fl                 auto     user,noauto                                        0  0

/dev/sda3              /home                     ext3     defaults,noatime                                   0  1
/dev/sda4              /home/lamdacore/NTFSHome  ntfs-3g  defaults,noatime,uid=1000,gid=100                  0  1
/dev/sda5              /boot                     ext2     defaults                                           0  1
/dev/sda6              /                         ext3     defaults,noatime                                   0  1
/dev/sda7              swap                      swap     defaults                                           0  0
UUID=5C847AF5847AD14E  /media/pandora            ntfs-3g  noauto,user,uid=1000,gid=100                      0  0
UUID=489D-B57F         /media/FAT32              vfat     noauto,user,uid=1000,gid=100,dmask=000,fmask=111  0  0

Last edited by lamdacore (2010-05-20 05:27:40)

Offline

#8 2010-05-31 23:01:12

lamdacore
Member
Registered: 2009-11-05
Posts: 128

Re: External HD permissions

bump!

Offline

#9 2010-06-01 00:41:16

rransom
Member
Registered: 2010-04-26
Posts: 92

Re: External HD permissions

NTFS-3G wrote:

Default settings

Using the default settings will mount the NTFS partition(s) at boot. With this method, if the parent folder that it is mounted upon has the proper user or group permissions, then that user or group will be able to read and write on that partition(s).

Who owns the mount point?

Offline

#10 2010-06-01 00:57:32

lamdacore
Member
Registered: 2009-11-05
Posts: 128

Re: External HD permissions

Hmm its owned by root. But the GID, UID fix that once I mount it.
I tried changing the owner of the folder and it works as it says, though the owner of the files is root, the user got -rwx permissions.

Still cant mount the partition as user or through Thunar.

Offline

#11 2010-06-01 01:21:34

rransom
Member
Registered: 2010-04-26
Posts: 92

Re: External HD permissions

http://ntfs-3g.org/support.html wrote:

Why don't the 'user' and 'users' options work in /etc/fstab?
The 'mount' command doesn't invoke the ntfs-3g binary with the needed privilege after it has checked and approved the user is entitled to mount a given device on a specified mount point, hereby the user can't open the device he got the approval in /etc/fstab. This is a problem in the 'mount' utility.
Solution: Use at least NTFS-3G 1.2506 with setuid-root set and make sure the user has access rights to the volume and mount point.

Try:

chmod u+s /usr/bin/ntfs-3g

This part of the NTFS-3G FAQ doesn't specify any required compile-time options.

Offline

#12 2010-06-01 02:57:39

lamdacore
Member
Registered: 2009-11-05
Posts: 128

Re: External HD permissions

there is no ntfs-3g executable in /usr/bin/

there is ntfs-3g.probe and ntfscat.
Shall I try this on one of these?

Offline

#13 2010-06-01 03:13:01

rransom
Member
Registered: 2010-04-26
Posts: 92

Re: External HD permissions

lamdacore wrote:

there is no ntfs-3g executable in /usr/bin/

Sorry -- pacman -Ql says it's in /bin.

Offline

#14 2010-06-01 08:08:53

lamdacore
Member
Registered: 2009-11-05
Posts: 128

Re: External HD permissions

No it didn't help.
Also why is it that I cant mount the FAT from Thunar (even though I can mount it as user from terminal)

Offline

Board footer

Powered by FluxBB