You are not logged in.

#1 2003-02-03 12:43:26

nehsa
Member
Registered: 2003-01-14
Posts: 159

changing permissions on mount

What do I need to do to get it so my normal user can access my windows partitions?

This is what i've tried so far:

chgrp users /bin/mount
chmod g+wxr /bin/mount

This now gives my normal account he ability to type mount, but.. if I try to actually mount something it says:  Only root can do that.

chgrp users /mnt/win-d
chmod g+wxr /mnt/win-d

This does do anything.. smile  If I try to change into win-d I just get, permission denied.

This as far as I can tell should give anyone in the users group complete access to that group, what am I missing?

Thanks

Offline

#2 2003-02-04 00:42:27

BluPhoenyx
Member
Registered: 2002-12-23
Posts: 239

Re: changing permissions on mount

Ok, this has to be said. RTFM smile

nehsa wrote:

chgrp users /bin/mount
chmod g+wxr /bin/mount

"Only root can do that."

This was rather pointless. The users could already use the mount command. You problem is not in the command itself but in the file /etc/fstab where you specify the drive's mount settings.

The error message above specifies that the settings are configured so that only root is allowed to do this, not that only root is able to. Please note, modifying this is considered a security breach.

To fix this you edit the file /etc/fstab and modify the entry you want to be user mountable. You may also need to set the permissions on the mount point in the file system depending on the desired security. A couple of examples follows.

# Win98 partition
/dev/hda1  /mnt/win98  vfat  users,noauto,defaults  0 0
# NFS from merlyn
merlyn:/  /mnt/merlyn  nfs  user,noauto,defaults 0 0

From left to right, the device to mount, the desired mount point, the filesystem (IIRC this is correct for Win9x-ME I don't have a Win partition,) the mount options (explained below) fs dump value and fs pass value. Note the white space between items, see the fstab file.

users = allows any user to mount or unmount a device or filesystem. Compare to user which allows anyone to mount the device/fs and only that same user or root to unmount it. This is often preferred by some users.

noauto = don't mount automatically.

defaults = apply any standard mount options not specified for the given filesystem.

nehsa wrote:

chgrp users /mnt/win-d
chmod g+wxr /mnt/win-d

This does do anything.. smile

Sure it does. It gave the directory RWX permissions for the group. However, unless you really want everyone in that group to access these file areas, this is not a good idea. I suggest a smaller group which excludes the possibility of external access via hacking. Then again, I'm a little paranoid.


BluPhoenyx

Offline

#3 2003-06-17 18:25:55

nehsa
Member
Registered: 2003-01-14
Posts: 159

Re: changing permissions on mount

That worked, I have two questions though.. smile

I can access partition E because it is vfat and set to group users.  Problem is, drive C & D are both NTFS and set to root.root.  I assume thats why I can access E but get a
"bash: cd: /mnt/c: Permission denied" when I try to access the others.  Any way around this?

Second questions, I guess why it wasn't working before was because it was automounting to root?  Is there a way to have it automount on bootup but still be accessible from my user account?

Offline

#4 2003-06-20 20:23:09

dariball
Member
From: Germany - Frankfurt
Registered: 2002-10-20
Posts: 118
Website

Re: changing permissions on mount

i can just suggest a workaround :
( i don't know if this is the professional way, but it works )

just add something like this into your rc.local:

su youruser -c "mount /dev/hdaX /mnt/<yourdir>"

don't forget that writing on NTFS partitions is only experimental if your kernel has it compiled in, it could maybe damage your files on the NTFS partition.

greetz


nothing,
maybe I have a perfect signature _someday_

Offline

#5 2003-06-21 21:13:38

apeiro
Daddy
From: Victoria, BC, Canada
Registered: 2002-08-12
Posts: 771
Website

Re: changing permissions on mount

If you need it to be accessible to only one user, then you can specify that on the mount command line.

# mount -o uid=1000 /dev/discs/disc0/part1 /mnt

Offline

#6 2003-06-22 07:00:09

orelien
Forum Fellow
From: France
Registered: 2002-12-05
Posts: 220
Website

Re: changing permissions on mount

nehsa wrote:

Is there a way to have it automount on bootup but still be accessible from my user account?

You could also update your /etc/fstab:

/dev/discs/disc0/part10 /mnt/docs vfat gid=users,umask=002 0 0

Offline

#7 2016-06-20 17:25:19

sudo98
Member
Registered: 2016-06-12
Posts: 3

Re: changing permissions on mount

try installing ntfs-3g

Offline

#8 2016-06-20 17:36:30

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

Re: changing permissions on mount

I hope they are not still fighting this some thirteen years later.   (Although that is good advice smile )

Closing. https://wiki.archlinux.org/index.php/Co … bumping.22


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB