PDA

View Full Version : FC4/Samba mounts are 'permission denied"


skdvr369
2006-02-24, 06:35 AM CST
I'm trying to mount a drive on an xp machine to my FC4 box using SAMBA. The mount is successful, but I'm unable to see anything in the mounted drive:
[root@TrooperRad mnt]# mount -t smbfs //Winbox/MyDocs /mnt/test2 -o username=dhuff,password=xxxx,user,noauto,workgroup =workgroup,uid=dbhuff,gid=users,fmask=0777,dmask=0 777,rw
[root@TrooperRad mnt]# cd /mnt/test2
[root@TrooperRad test2]# ls
ls: .: Permission denied

/proc/mounts shows:
//winbox/MyDocs /mnt/test2 smbfs rw,nodiratime,nosuid,nodev,uid=500,gid=100,file_mo de=0777,dir_mode=0777 0 0

I''ve added a lot of options to try to resolve, but basically the same result if few options are used. Permission is denied to user dbhuff (500) and to root.

Now the strange part, if I use the GUI on GNOME, I can Open the Computer Icon, click on Network/ Windows network, and open location to the share. It works fine then, I can see files. So doesn't seem like a firewall issue or anything.
2.6.15-1.1831_FC4
samba-3.0.14a
Thanks for any help!

edited to add:
I've also tried cifs, but because I need to use Netbios name instead of static IP, it doesn't resolve. One suggestion was nsswitch, anyone know how? But this really seems too hard, no?

skdvr369
2006-02-25, 07:28 AM CST
I'm replying because I got cifs working and thought it would be helpful. In etc/nsswitch,conf, add "wins" to the "hosts:" line, in etc/samba/smb.conf, set "wins support = yes", add the samba server to the advanced wins setup on the WIndows client, and use //server/share /mnt/point cifs -o username=winuser,password=winpass,workgroup=workgr oup 0 0 in fstab

SMB isn't running when you first boot up, so you will get an error, but adding
mount -a
as a cron job will periodically check and when samba is running will mount the share.

I find I have to browse FROM the windows computer to 'activate' the wins link, cifs mounts fail until the windows machine has seen the samba server... And I never did get smbfs to work, but cifs is supposed to be the latest anyway. Still, this needing to browse from the Windows machine before I can make a connection is not ideal.

comments anyone?

jhetrick62
2006-03-26, 10:19 PM CST
I don't have that issue so you have something set up wrong. I never had to modify anything on my Windows machine. First, put the workgroup in your smb.conf file. Then you won't need it in mount line. That also may solve your problem with needing to browse the windows machine first. Just a guess.

Secondly, you need to check off the smb service in the runlevel 5. Open terminal and become su and type: system-config-services to edit services and check off smb. Then restart it for good measure. It should start up always then on reboot. I reboot my machine and NEVER log in and I can still access my shares from windows and my other FC box.

I also believe that your WINS settings are wrong. The easiest way is to set you FC machine to be a WINS server unless your xp machine is attempting to do that. In that case, make your FC machine a Wins client by specifying the ip address of the xp machine and run that one on static ip.

Several different issues here so I will add my smb.conf file for my server for you to look at. I hit to and from this with both my Windows and FC3 machine. This file is running on FC4 and FC5 depending on what I have booted. Same file either way.

Jeff