From owner-freebsd-questions@FreeBSD.ORG Thu Sep 25 22:37:50 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8515316A4B3 for ; Thu, 25 Sep 2003 22:37:50 -0700 (PDT) Received: from cableaz.com (mail.cableaz.com [66.218.238.20]) by mx1.FreeBSD.org (Postfix) with SMTP id BAA2043FB1 for ; Thu, 25 Sep 2003 22:37:47 -0700 (PDT) (envelope-from desertfox@cableaz.com) Received: (qmail 12686 invoked by uid 0); 26 Sep 2003 04:49:36 -0000 Received: from unknown (HELO CopperLeafAngel) (66.218.239.229) by 0 with SMTP; 26 Sep 2003 04:49:36 -0000 From: Erick Smith To: "C. Ulrich" Date: Thu, 25 Sep 2003 21:49:32 -0700 User-Agent: KMail/1.5.3 References: <200309260319.h8Q3J5S05397@anon.securenym.net> In-Reply-To: <200309260319.h8Q3J5S05397@anon.securenym.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200309252149.32121.desertfox@cableaz.com> cc: freebsd-questions@freebsd.org Subject: Re: problems writing to smbfs mount X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Sep 2003 05:37:50 -0000 I tried to do this a while back and ran into the same problems that you mention. I eventually gave up and wrote a shell script to mount the smb share. I put this in the /usr/home/etc/rc.d directory. It isn't fstab then, but accomplishes the same thing, plus it won't crash your boot process if the smb share is unavailable when you boot. On Thursday 25 September 2003 08:17 pm, C. Ulrich wrote: > 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= > > 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