Subject: Re: SMBFS
To: Jan Schaumann <jschauma@netmeister.org>
From: Jaromir Dolecek <jdolecek@NetBSD.org>
List: netbsd-users
Date: 03/12/2004 09:26:50
Jan Schaumann wrote:
-- Start of PGP signed section.
> Hi,
> 
> I'm trying to use mount_smbfs to access a remote Windows share:
> 
> mount_smbfs -I remote.server.name -W campus -u jschauma	\
> //jschauma@remote/jschauma /mnt
> Password:

There are problems with using alternate owner of the mounted
tree (i.e. -u). I will be looking on those soon. Can you
try without -u meanwhile?

Jaromir

> This only succeeds if I do this as root.  As a regular user, I get:
> mount_smbfs: unable to open connection: syserr = Operation not permitted
> 
> Tracing it:
>    763 mount_smbfs CALL  open(0xbfbfed84,0x2,0x4805429c)
>    763 mount_smbfs NAMI  "/dev/nsmb0"
>    763 mount_smbfs RET   open 3
>    763 mount_smbfs CALL  ioctl(0x3,_IOW('n',0x6a,0x4),0xbfbfedc4)
>    763 mount_smbfs GIO   fd 3 wrote 772 bytes
> [...]
>    763 mount_smbfs RET   ioctl -1 errno 1 Operation not permitted
> 
> $ ls -l /dev/nsmb0
> crw-rw-rw-  1 root  wheel  98, 0 Mar  8 15:20 /dev/nsmb0
> 
> Anyway, so as root I can mount the share:
> 
> df(1) shows it mounted, and I can copy files to it etc.  But I can't
> ls(1) it:
> 
> $ ls -l
> ls: .: Invalid argument
> 
> $ ls -l file
> -rwxrwxrwx  1 jschauma  wheel  137837347 Mar  8 16:37 file
> 
> 
> And I can't unmount the filesystem either, the filesystem seems busy,
> even though nothing has, as far as I can determine, a filehandle open.
> Forcing the unmount just crashed my system.
> 
> This is a -current kernel (1.6ZC).
> 
> Does anbody know what's going on or if there's anything I'm doing wrong?
> 
> -Jan
> 
> -- 
> "Ford," he said, "you're turning into a penguin. Stop it."
-- End of PGP section, PGP failed!

-- 
Jaromir Dolecek <jdolecek@NetBSD.org>            http://www.NetBSD.cz/
-=- We should be mindful of the potential goal, but as the Buddhist -=-
-=- masters say, ``You may notice during meditation that you        -=-
-=- sometimes levitate or glow.   Do not let this distract you.''   -=-