Click to See Complete Forum and Search --> : only root can write to windows share
jcrosslin
02-22-2003, 12:38 PM
hello,
I am running LM 9.0 and I have samba setup to where my windows box can read and write to my linux shares. However when loged in as a regular user I can only read the windows shares. When I access as root, root can read and write to the windos share. The windows box is win xp. I have the windows shares set up from within windows so that users cas write to the share.
any help would be appreciated.
thanks
cowanrl
02-22-2003, 01:22 PM
If you are mounting the Windows share in the fstab file, you need to add the uid or gid option to the line that mounts the share. The line might look something like this:
//servername/sharename /mountdirectory smbfs credentials=/home/myhomedirectory/. smbpasswd,uid=mylinuxusername 0 0
Take a look at this post for some further details:
http://www.justlinux.com/forum/showthread.php?s=&threadid=42967&highlight=smbmount
You can also look at the man pages for mount and smbmount for more info.
jcrosslin
02-22-2003, 01:51 PM
that did not work here is my fstab file
thanks for your help
/dev/hda6 / reiserfs notail 1 1
/dev/hda1 /boot ext3 defaults 1 2
none /dev/pts devpts mode=0620 0 0
//melanie/hallmark /home/john/hallmark smbfs credentials=/etc/samba/auth.melanie.melanie,uid=john 0 0
//melanie/My\040Documents /home/john/mel smbfs credentials=/etc/samba/auth.melanie.melanie,uid=john 0 0
/dev/hdb1 /mnt/backup reiserfs notail 1 2
none /mnt/cdrom supermount dev=/dev/scd0,fs=auto,ro,--,iocharset=iso8859-1,codepage=850 0 0
none /mnt/floppy supermount dev=/dev/fd0,fs=auto,--,iocharset=iso8859-1,sync,codepage=850 0 0
none /proc proc defaults 0 0
/dev/hda5 swap swap defaults 0 0
bwkaz
02-22-2003, 02:11 PM
If all else fails, you can add a ,umask=0000 to the options field in fstab. But see if you can get something else to work first; this will allow everyone that has access to your machine full access to the share.
cowanrl
02-22-2003, 02:22 PM
I have seen some people say that they had to use the numeric uid instead of the username as the value for uid to get it to work. On my RH 7.3 system here, I've tested it with both the username and numeric uid and both work.
You may also want to try adding the dmask option to the command as well though it shouldn't be needed. It should default to the current umask setting.
You can try adding dmask=775 after the uid=<numeric uid> option and see if that helps. The entire line might look something like this:
//melanie/hallmark /home/john/hallmark smbfs credentials=/etc/samba/auth.melanie.melanie,uid=501,dmask=775 0 0
That example would be assuming your numeric uid is 501.