You are not logged in.
I'm trying to mount my 2nd hard drive (used as a data partition by a prior Win7 installation) as user.
In /etc/fstab I have:
/dev/sdb5 /mnt/win auto user,noauto 1 1
I can then run "mount /dev/sdb5" without sudo. But it sets the owner and group of /mnt/win to root:root and permissions to -rwx------
Running "sudo chown -R ian:users /mnt/win" only changes the directories, not the files. I can't find anything in the chown manpage to indicate an option I'm missing. Can anybody help me out? Not much point mounting the partition if I can't even read them.
Thanks.
Last edited by ibrunton (2011-07-26 14:33:56)
Offline
You can mount it with other options - 'man mount'. (e.g. dmask=007,fmask=117)
Last edited by karol (2011-07-26 14:15:06)
Offline
There's nothing in 'man mount' about dmask or fmask...
Offline
There's nothing in 'man mount' about dmask or fmask...
Hmmm
[karol@black ~]$ man mount | grep -A2 "dmask=value"
dmask=value
Set the umask applied to directories only. The default is the umask of the cur‐
rent process. The value is given in octal.
[karol@black ~]$ man mount | grep -A2 "fmask=value"
fmask=value
Set the umask applied to regular files only. The default is the umask of the
current process. The value is given in octal.
I use
mount -o gid=users,uid=1000,dmask=0002,fmask=0113 /dev/sdb1 /media/usb/
and get
[karol@black ~]$ ls -l /media/
total 12
drwxr-xr-x 2 root root 4096 2011-01-10 cd
drwxrwxr-x 13 karol users 8192 1970-01-01 usb
You can find your uid (your user id) in /etc/passwd and your gid (group - i.e. 'users' - id) - in /etc/group.
Last edited by karol (2011-07-26 14:28:23)
Offline
ibrunton wrote:There's nothing in 'man mount' about dmask or fmask...
Hmmm
[karol@black ~]$ man mount | grep -A2 "dmask=value" dmask=value Set the umask applied to directories only. The default is the umask of the cur‐ rent process. The value is given in octal. [karol@black ~]$ man mount | grep -A2 "fmask=value" fmask=value Set the umask applied to regular files only. The default is the umask of the current process. The value is given in octal.
Now, that worked. When I tried searching from within man, it said the pattern (fmask) was not found. I guess I'm just not good enough at commands in man yet.
I use
mount -o gid=users,uid=1000,dmask=0002,fmask=0113 /dev/sdb1 /media/usb/
That also worked. Thanks!
Offline