PDA

View Full Version : smbfs shares through /etc/fstab - help!


belthezar
20th May 2004, 06:23 PM
Ok, I am really wracking my brains over this one. I have done this for several years under Linux, but for whatever reason the following is not working in FC2.

I am able to mount smbfs shares all day long from the command line and they work perfectly. I can mount as root and then login as my user account and work on them no problem whatsoever. BUT, if I setup /etc/fstab to allow easier mounting, no one is able to read the mounts - not even root! For instance even a simple ls gives:

[root@avod-sandej-lx mnt]# ls it/
ls: reading directory it/: Permission denied

The odd thing is that I get no errors when mounting through fstab, and it is doing permissions like I am asking it to do.

I have done every combination I can think of in /etc/fstab but here is my most recent one. Even very simple ones do not work:

//fileserver/it /home/sandej/mnt/it smbfs noauto,rw,user,username='domain\sandej',password=' ****',uid=500,gid=100,dmask=770,fmask=660 0 0

And if I do an ls -l on the directory, you can see it did as I asked:

[root@avod-sandej-lx mnt]# ls -l
total 12
drwxrwxr-x 2 sandej sandej 4096 May 18 16:49 home
drwxrwx--- 1 sandej users 4096 May 20 13:08 it
drwxrwxr-x 2 sandej sandej 4096 May 19 10:51 main

Any ideas are greatly appreciated.

Jim

Jman
21st May 2004, 04:15 AM
Try the users option, which should allow any user to mount it. See man mount for more options.

linuxzouk
21st May 2004, 04:33 AM

//192.168.0.1/linux /mnt/linux smbfs username=myusername,password=mypassword,uid=500,gi d=100,dmask=770,fmask=770 0 0

this works for me in fc1, users in group 100 can read/write

i didn't put ' for my username and password

belthezar
21st May 2004, 01:01 PM
I've tried both of those without any luck. It's not just users who can't view the mounted shared folder, even root can't use it!

I have to use the quotes in the username because I have to preface the domain name. I did try taking them out but it didn't help either. :(

I've never seen this happen before, the same mount command if issued straight from the command line works. But when using it via fstab it won't let anyone (root included) use the folder even though it does mount it correctly.

sect2k
22nd May 2004, 06:00 PM
Hi!

I hope this helps.

dmask and fmask (also umask) are filters of permissions, so they work in the opposite way to chmod.

Try setting them to 0007, this should set premissions to 770.

MattMann
10th May 2005, 06:18 PM
I know this is old, but I am having the EXACT problem, but I see no solution. This is pretty much the only thing I've found while searching the net, so I hope someone knows the solution...

hallcrash
10th May 2005, 06:21 PM
yeh got it working..
you must use 'cifs'
//1.1.1.1/Myfolder /mnt/mysharedfolder cifs username=user,password=pass,workgroup=workgroup,us er,ro 0 0.
and yes you need a FOLDER in the mnt directory called mysharedfolder in this case.. thanks for the help

hallcrash
10th May 2005, 07:12 PM
somebody post if this dosent help them or if it does. samba assures me that.. quote.. "cifs is the replacement for smbfs and it will fix most new found and upgrade problems with smbfs other then what is in bugzilla" thankx.