[TriLUG] my SAMBA problem

Jeremy Portzer jeremyp at pobox.com
Wed Sep 25 14:33:48 EDT 2002


On Wed, 2002-09-25 at 14:10, Greg Brown wrote:
> 
> Since this runs from the mount command I have to do this as root.  This means 
> that all the contents of /home/me/laptop are owned by root and I need to read 
> and write to this directory with my "me" user.  Changing ownership of the 
> directory to user 'me' doesn't work once the drive is mounted.
> 
> Any thoughts?  I checked the man page for mount and there is a "user" option 
> that allows users other than root to mount filesystems, but this only seems 
> to apply to filesystems defined in fstab.  I also tried linuxconf to see if I 
> could set the permissions on mount to allow my 'me' user.  No dice.

Check the man page for mount for the "uid" and "gid" options.  Those
will do what you want.

mount -t smb -o \
username=laptopUser,password=laptopPassword,uid=500,gid=500 \
//my.ip.address.here/vtcdev /home/me/laptop 

(Assuming 500 are the uid and gid you want to use.)

Also, remember that you can put most of these options in your /etc/fstab
(everything but the password) so it's easier to mount things next time. 
Use the "noauto" option to prevent it from trying to mount at boot-time.

Hope this helps,
Jeremy




More information about the TriLUG mailing list