[Samba] Linux export always R/O to PC no matter what

William Fry william.fry at nyu.edu
Wed Nov 15 19:22:27 GMT 2006


I'm sure this is a question asked many times before, but before I'm flamed,
let me state that I've spent TWO WEEKS researching and testing this problem.
I've read so many "How To's," forum postings, news groups, and "official
docs," I should be an expert on Samba by now. It's obscene.

I have an external USB drive - Western Digital 160GB USB 2.0 - attached to a
Debian 3.1r2 PowerPC box. The WD drive is preformatted for Windows use, so
I'm mounting in on its host as "vfat."

My goal is to share this drive (and future ones) to all the other machines
on my LAN. Basically, I'm creating my own network-attached storage device.

I am using Samba to share out this drive to all the other machines on my
network. I have other Linux boxes, MacOS X boxes, and WinXPpro boxes. I have
no (Windows) domain controller and I'm content with (Samba) "share level"
access control but prefer "user level" access control. All this is on my
private LAN; I have no interest in exposing this drive/its shares outside my
LAN. Everyone within the LAN is "trusted."

With my current setup, all machines can READ, but only the Linux machines
(Debian, MacOSX) can write; the PC's (WinXPpro) seem to be stuck as R/O.

Below are the relevant files and connection commands ...


******************************
** Debian box "maurice" hosting and exporting WD USB drive:

Mount point: /mnt/nas01
Have local user "nas" of local group "nas"
User:group nas:nas own mount point

mount -t vfat -o uid=nas,gid=nas,umask=002,dmask=002,fmask=003,\
    sync,exec,suid,nodev,rw /dev/sda1 /mnt/nas01

/etc/samba/smb.conf:
[global]
# all defaults!
[root$]
    path = /mnt/nas01
    force user = nas
    force group = nas
    writeable = yes
    read only = no
    browseable = yes
    printable = no
    guest ok = no
[pub]
    path = /mnt/nas01/pub
    writeable = no
    read only = yes
    browseable = yes
    printable = no
    guest ok = yes
[priv]
    path = /mnt/nas01/priv
    force user = nas
    force group = nas
    writeable = yes
    read only = no
    browseable = yes
    printable = no
    guest ok = no

******************************
** Debian box(es) mounting SMB share:

Have local user "nas" of local group "nas" This mirrors nas:nas - same
uid/gid - as on "maurice". User:group nas:nas own mount points /mnt/nas01*

mount -t smbfs username=nas,password=A_SECRET,uid=nas,gid=nas,\
    suid,sync,exec,nodev,rw //maurice/root$ /mnt/nas01
mount -t smbfs username=nas,password=A_SECRET,uid=nas,gid=nas,\
    suid,sync,exec,nodev,rw //maurice/pub /mnt/nas01-pub
mount -t smbfs username=nas,password=A_SECRET,uid=nas,gid=nas,\
    suid,sync,exec,nodev,rw //maurice/priv /mnt/nas01-priv

(These manual mounts have the same options as the /etc/fstab mounts except
for _netdev and auto/user.)

All reading/writing is "as expected" based on user, group, ownership, and
Samba settings.


******************************
** MacOSX box(es) mounting SMB share:

mount_smbfs //nas:A_SECRET at maurice/root\$ mnt/nas01

All reading/writing is "as expected" based on user, group, ownership, and
Samba settings.


******************************
** WinXP box(es) mapping to SMB share:

net use * \\maurice\root$ A_SECRET /user:nas

Maps as, say W:, successfully.
All access through W: is READ ONLY!!!


Any clues?!!!
Thanks ever, ever, ever so much.
- Liam




More information about the samba mailing list