[KLUG Members] Windows mounted file permissions

Dirk H Bartley members@kalamazoolinux.org
Tue, 27 Nov 2001 10:35:28 -0500


Scott Thurmond wrote:
> 
> I know almost nothing about the fstab file.  For example, I have a windows
> box called win1 and a share called "docs".  I want to mount the share such
> that the permissions are scott:scott.
> 
> By looking at the fstab file, it looks like I need to do something like:
> //win1/docs /home/scott/win1 user=scott
> 
> Will it ask for a password or do I need to supply it in the fstab file?

Here are a couple of fstab entries for example purposes.  The first is an nfs
mount and the next two are smb mounts.  with these two entries I can mass mount
and umount them with /etc/rc.d/init.d/netfs start and stop.

sassrv1:/usr/dbartley   /mnt/nfs/sas    nfs    
rsize=8192,wsize=8192,timeo=14,intr     0 0
//srv/aluminum      /mnt/smb/aluminum       smbfs  
ip=x.x.x.x,username=dbartley%whopper,uid=dbartley,gid=dbartley
//srv/user\040folders       /mnt/smb/users  smbfs  
ip=x.x.x.x,username=dbartley%whopper,uid=dbartley,gid=dbartley

man smbmount for the available options.
man fstab

I hope this helps.

Dirk


> 
> -----Original Message-----
> From: members-admin@kalamazoolinux.org
> [mailto:members-admin@kalamazoolinux.org]On Behalf Of Bruce Smith
> Sent: Tuesday, November 27, 2001 9:42 AM
> To: members@kalamazoolinux.org
> Subject: Re: [KLUG Members] Windows mounted file permissions
> 
> > I have mounted some windows shares from my linux box.  The problem is that
> I
> > have to mount them as root (at least I think I have to) and when I login
> as
> > a regular user and cd to the windows shares all the file permissions are
> set
> > to root:root.  How can I mount the shares such that either everyone can
> use
> > the files or set the permissions for a specific user?
> 
> If you add the "user" parameter to the options in /etc/fstab then any
> user can mount and umount the filesystem.
> 
> And (the last time I tried, way back when I had a windows filesystem :)
> when a normal user mounts it, the user & group are set to be the same
> as the mounting user.
> 
> Otherwise you can specifiy options to lock the user and/or group to
> a specific user in /etc/fstab.
>