Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Sep 2003 23:17:40 -0400
From:      "C. Ulrich" <dincht@securenym.net>
To:        freebsd-questions@freebsd.org
Subject:   problems writing to smbfs mount
Message-ID:  <200309260319.h8Q3J5S05397@anon.securenym.net>

next in thread | raw e-mail | index | archive | help
Greetings,

I finally got smbfs to mount a Samba share to a specific directory at
boot time (without prompting for the password) via /etc/fstab. However,
I still have a problem.  I can read all files and directories just fine.
My permissions are correct. But whenever I try to write to the share,
the write fails and an error is returned, "no such file or directory".
If I try to replace a file on the share that already exists I get
"permission denied". Windows XP has no problem reading, writing, or
otherwise accessing the share, which is why I'm posting it here instead
of to a Samba list. Nothing particularly helpful showed up in a google
or rambler search.

Perhaps a more detailed explanation is in order.

The remote server is Samba 3.0.0rc4. The local machine is FreeBSD
5.1-RELEASE. Samba is using the following smb.conf (which I realize
isn't very secure, it's just for testing at the moment):

[global]
        netbios name = POWERFACE
        workgroup = EILNET
        security = share
        log file = /usr/local/samba/var/log.samba
        socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
        encrypt passwords = yes
        wins support = yes
[smbshare]
        path = /nfs/share
        guest ok = yes
        writeable = yes

I then added a user with smbpasswd named eil. Now on the FreeBSD
machine, I made sure to enable the correct options in the kernel config
file and rebuilt whatever needed rebuilding followed by a reboot. I
created the following /root/.nsmbrc so that FreeBSD could mount the
share at runtime without it prompting for a password.

[default]
nbns=192.168.0.3
workgroup=EILNET

[powerface:eil:smbshare]
addr=192.168.0.3
password=<pass>

Next I added the line for /etc/fstab:

//eil@POWERFACE/smbshare /home/eil/share smbfs  rw,noauto       0      
0

Finally, I took smbfs.sh.sample and copied it to
/usr/local/etc/rc.d/smbfs.sh and rebooted. FreeBSD mounts the share in
the proper location automatically and I can read every file and
directory. But when I try to copy, move, or otherwise write a file to
the share I get:

[apex:~]$ cp .profile share/
cp: share/.profile: No such file or directory

And when I try to copy or otherwise write to a file that already exists
on the share, I get a different error:

[apex:~]$ cp share/code/tcl/dbtest.tcl temp/
[apex:~]$ cp temp/dbtest.tcl share/code/tcl/
cp: share/code/tcl/dbtest.tcl: Permission denied

Anybody have any enlightening advice?

C. Ulrich
-- 
http://bityard.net



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200309260319.h8Q3J5S05397>