Bug in smbmount?

Urban Widmark urban at svenskatest.se
Thu Jul 6 11:44:34 GMT 2000


On Thu, 6 Jul 2000, Christopher K. Johnson wrote:

> As root I can mount an NT share onto the Linux system:
> /usr/bin/smbmount '//ntserver/myshare' /mnt/test -o
> username=mylinuxuser,password=something,uid=myntuser,workgroup=CMP
>
> But the mount point gets forced to mode 555 instead of 755.  It's not an
> NT write permission being expressed because as root on linux I can write
> to the mounted directory (touch a file, etc.), but not as the owning
> user of course since it does not have write permission.

The argument to uid is a local uid (or username) so unless your nt
username matches I think 'myntuser' is wrong (shouldn't matter, but I
think you have mixed your nt and linux users here).

Does specifying a mask for directories and files help?

mount -t smbfs -o 
username=mylinuxuser,password=something,uid=myntuser,dmask=0755,fmask=0755 
//ntserver/myshare /mnt/test

Does your root user have an umask set to 0222 or so when you run the mount
command? I can reproduce it by doing:
# umask 0222
# mount -t smbfs -o ... /mnt/smb
# ls -al /mnt/smb
total 3
dr-xr-xr-x   1 urban    root          512 Jul  1 21:41 ./
...
# umount /mnt/smb
# mount -t smbfs -o ...,dmask=0755,fmask=0755 /mnt/smb
# ls -al /mnt/smb
total 3
drwxr-xr-x   1 urban    root          512 Jul  1 21:41 ./
...


> Seems like a bug to me.

Maybe. smbmnt does tricks with umask(), it looks quite intentional.

/Urban



More information about the samba mailing list