Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: Cannot write to Samba shares

  1. #1
    Join Date
    Jun 2008
    Location
    Pacific Northwest
    Posts
    289

    Default Cannot write to Samba shares

    Using SuSE 11./4 on two machines. Successfully set up a server to share a folder. The client is able to read files from the folder, but not write to them. From the client perspective, the shared folder permissions are read and write if owner, read only for all others. However, the server shared folder has been set up for sharing, and the permissions are set for read and write to all.

    One more thing. When the client goes into the samba share, it sees the workgroup. Clicking into that, it sees the name of the server computer. Clicking into that, it sees two folders: "profiles" and "users". Clicking into "users" goes into the shared folder. I tried setting the permissions from the client side on the "users" folder using root privileges to allow reading and writing without any success.

    Any help would be appreciated. Thanks.
    The greatest obstacle to discovery is not ignorance, it is the illusion of knowledge.
    Daniel J. Boorstin US Patent Office

  2. #2
    Join Date
    Nov 2009
    Location
    ND, USA
    Posts
    1,036

    Default Re: Cannot write to Samba shares

    On Thu September 15 2011 02:16 pm, Parthenolide wrote:

    >
    > Using SuSE 11./4 on two machines. Successfully set up a server to share
    > a folder. The client is able to read files from the folder, but not
    > write to them. From the client perspective, the shared folder
    > permissions are read and write if owner, read only for all others.
    > However, the server shared folder has been set up for sharing, and the
    > permissions are set for read and write to all.
    >
    > One more thing. When the client goes into the samba share, it sees the
    > workgroup. Clicking into that, it sees the name of the server computer.
    > Clicking into that, it sees two folders: "profiles" and "users".
    > Clicking into "users" goes into the shared folder. I tried setting the
    > permissions from the client side on the "users" folder using root
    > privileges to allow reading and writing without any success.
    >
    > Any help would be appreciated. Thanks.
    >
    >

    Parthenolide;

    Can you post the contents of /etc/samba/smb.conf. Just replace any sensitive
    data (e.g. public IPs) with substitute values. In addition these tutorials
    might help:

    http://opensuse.swerdna.org/suselanprimer.html
    and
    http://opensuse.swerdna.org/susesambaserver.html
    --
    P. V.
    "We're all in this together, I'm pulling for you." Red Green

  3. #3
    Join Date
    Jun 2008
    Location
    Pacific Northwest
    Posts
    289

    Default Re: Cannot write to Samba shares

    Client Side:

    # smb.conf is the main Samba configuration file. You find a full commented
    # version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if the
    # samba-doc package is installed.
    # Date: 2011-07-28
    [global]
    workgroup = WORKGROUP
    passdb backend = tdbsam
    printing = cups
    printcap name = cups
    printcap cache time = 750
    cups options = raw
    map to guest = Bad User
    include = /etc/samba/dhcp.conf
    logon path = \\%L\profiles\.msprofile
    logon home = \\%L\%U\.9xprofile
    logon drive = P:
    usershare allow guests = Yes
    [homes]
    comment = Home Directories
    valid users = %S, %D%w%S
    browseable = No
    read only = No
    inherit acls = Yes
    [profiles]
    comment = Network Profiles Service
    path = %H
    read only = No
    store dos attributes = Yes
    create mask = 0600
    directory mask = 0700
    [users]
    comment = All users
    path = /home
    read only = No
    inherit acls = Yes
    veto files = /aquota.user/groups/shares/
    [groups]
    comment = All groups
    path = /home/groups
    read only = No
    inherit acls = Yes
    [printers]
    comment = All Printers
    path = /var/tmp
    printable = Yes
    create mask = 0600
    browseable = No
    [print$]
    comment = Printer Drivers
    path = /var/lib/samba/drivers
    write list = @ntadmin root
    force group = ntadmin
    create mask = 0664
    directory mask = 0775
    The greatest obstacle to discovery is not ignorance, it is the illusion of knowledge.
    Daniel J. Boorstin US Patent Office

  4. #4
    Join Date
    Jun 2008
    Location
    Pacific Northwest
    Posts
    289

    Default Re: Cannot write to Samba shares

    Server side:

    # smb.conf is the main Samba configuration file. You find a full commented
    # version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if the
    # samba-doc package is installed.
    # Date: 2011-03-01
    [global]
    workgroup = WORKGROUP2
    printcap name = cups
    cups options = raw
    map to guest = Bad User
    include = /etc/samba/dhcp.conf
    logon path = \\%L\profiles\.msprofile
    logon home = \\%L\%U\.9xprofile
    logon drive = P:
    usershare allow guests = Yes
    add machine script = /usr/sbin/useradd -c Machine -d /var/lib/nobody -s /bin/false %m$
    domain master = No
    usershare max shares = 100

    ## Share disabled by YaST
    # [homes]
    # comment = Home Directories
    # valid users = %S, %D%w%S
    # browseable = No
    # read only = No
    # inherit acls = Yes
    [profiles]
    comment = Network Profiles Service
    path = %H
    read only = No
    store dos attributes = Yes
    create mask = 0600
    directory mask = 0700

    [users]
    comment = All users
    path = /home/PMG/share/
    read only = no
    inherit acls = yes
    veto files = /aquota.user/groups/shares/
    guest ok = yes
    inherit permissions = yes

    ## Share disabled by YaST
    # [groups]
    # comment = All groups
    # path = /home/groups
    # read only = No
    # inherit acls = Yes
    [printers]
    comment = All Printers
    path = /var/tmp
    printable = Yes
    create mask = 0600
    browseable = No

    [print$]
    comment = Printer Drivers
    path = /var/lib/samba/drivers
    write list = @ntadmin root
    force group = ntadmin
    create mask = 0664
    directory mask = 0775
    The greatest obstacle to discovery is not ignorance, it is the illusion of knowledge.
    Daniel J. Boorstin US Patent Office

  5. #5
    Join Date
    Jun 2008
    Location
    Pacific Northwest
    Posts
    289

    Default Re: Cannot write to Samba shares

    BTW: The client side used to be the server. It was switched with the acquisition of a new computer.
    The greatest obstacle to discovery is not ignorance, it is the illusion of knowledge.
    Daniel J. Boorstin US Patent Office

  6. #6
    Join Date
    Nov 2009
    Location
    ND, USA
    Posts
    1,036

    Default Re: Cannot write to Samba shares

    On Thu September 15 2011 05:26 pm, Parthenolide wrote:

    >
    > Server side:
    >
    > # smb.conf is the main Samba configuration file. You find a full
    > commented
    > # version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if
    > the
    > # samba-doc package is installed.
    > # Date: 2011-03-01
    > [global]
    > workgroup = WORKGROUP2
    > printcap name = cups
    > cups options = raw
    > map to guest = Bad User
    > include = /etc/samba/dhcp.conf
    > logon path = \\%L\profiles\.msprofile
    > logon home = \\%L\%U\.9xprofile
    > logon drive = P:
    > usershare allow guests = Yes
    > add machine script = /usr/sbin/useradd -c Machine -d /var/lib/nobody
    > -s /bin/false %m$
    > domain master = No
    > usershare max shares = 100
    >
    > ## Share disabled by YaST
    > # [homes]
    > # comment = Home Directories
    > # valid users = %S, %D%w%S
    > # browseable = No
    > # read only = No
    > # inherit acls = Yes
    > [profiles]
    > comment = Network Profiles Service
    > path = %H
    > read only = No
    > store dos attributes = Yes
    > create mask = 0600
    > directory mask = 0700
    >
    > [users]
    > comment = All users
    > path = /home/PMG/share/
    > read only = no
    > inherit acls = yes
    > veto files = /aquota.user/groups/shares/
    > guest ok = yes
    > inherit permissions = yes
    >
    > ## Share disabled by YaST
    > # [groups]
    > # comment = All groups
    > # path = /home/groups
    > # read only = No
    > # inherit acls = Yes
    > [printers]
    > comment = All Printers
    > path = /var/tmp
    > printable = Yes
    > create mask = 0600
    > browseable = No
    >
    > [print$]
    > comment = Printer Drivers
    > path = /var/lib/samba/drivers
    > write list = @ntadmin root
    > force group = ntadmin
    > create mask = 0664
    > directory mask = 0775
    >
    >

    [quote=Parthenolide]
    Client Side:

    # smb.conf is the main Samba configuration file. You find a full
    commented
    # version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if
    the
    # samba-doc package is installed.
    # Date: 2011-07-28
    [global]
    workgroup = WORKGROUP
    passdb backend = tdbsam
    printing = cups
    printcap name = cups
    printcap cache time = 750
    cups options = raw
    map to guest = Bad User
    include = /etc/samba/dhcp.conf
    logon path = \\%L\profiles\.msprofile
    logon home = \\%L\%U\.9xprofile
    logon drive = P:
    usershare allow guests = Yes
    [homes]
    comment = Home Directories
    valid users = %S, %D%w%S
    browseable = No
    read only = No
    inherit acls = Yes
    [profiles]
    comment = Network Profiles Service
    path = %H
    read only = No
    store dos attributes = Yes
    create mask = 0600
    directory mask = 0700
    [users]
    comment = All users
    path = /home
    read only = No
    inherit acls = Yes
    veto files = /aquota.user/groups/shares/
    [groups]
    comment = All groups
    path = /home/groups
    read only = No
    inherit acls = Yes
    [printers]
    comment = All Printers
    path = /var/tmp
    printable = Yes
    create mask = 0600
    browseable = No
    [print$]
    comment = Printer Drivers
    path = /var/lib/samba/drivers
    write list = @ntadmin root
    force group = ntadmin
    create mask = 0664
    directory mask = 0775
    [quote]

    Parthenolide;
    The most obvious fact is that you have different values for the workgroup
    parameter in the two configs. All machines using these shares should be in
    the same workgroup (Windows, Mac, or Linux). Try setting the parameter:
    Code:
    workgroup = WORKGROUP
    in both smb.confs. You can use any valid netbios name for the value
    of "workgroup=", just make sure they are the same. After restarting smb and
    nmb on both the server and client see if this helps. If not report back.
    Code:
    su
    rcsmb restart
    rcnmb restart
    You may already be aware of the problem between Novell AppArmor and Samba on
    OpenSuSE 11.4. You might want to turn off AppArmor for smbd and nmbd.
    YaST>Novell Apparmor> AppArmor Control Panal>Set profile modes, set both
    usr.sbin.[s,n]mbd to complain NOT enforce. (I don't think this is your
    problem, but just incase...)
    --
    P. V.
    "We're all in this together, I'm pulling for you." Red Green

  7. #7
    Join Date
    Jun 2008
    Location
    Pacific Northwest
    Posts
    289

    Default Re: Cannot write to Samba shares

    I redid the samba configuration. Here is the contents of smb.conf:
    [global]
    add machine script = /usr/sbin/useradd -c Machine -d /var/lib/nobody -s /bin/false %m$
    domain logons = No
    domain master = No
    passdb backend = smbpasswd
    security = user
    wins support = No
    workgroup = workgroup
    ldap suffix =
    wins server =

    [PMG]
    path = /home/PMG/share
    read only = No
    guest ok = Yes
    force user = PMG

    ## Share disabled by YaST
    # [netlogon]

    *****
    The "share" folder share permissions have been enabled, and the permissions allow read and write access to all. However, the samba clients can read and not write to the folder /home/PMG/share.
    The greatest obstacle to discovery is not ignorance, it is the illusion of knowledge.
    Daniel J. Boorstin US Patent Office

  8. #8
    Join Date
    Nov 2009
    Location
    ND, USA
    Posts
    1,036

    Default Re: Cannot write to Samba shares

    On Sat September 17 2011 06:36 pm, Parthenolide wrote:

    >
    > I redid the samba configuration. Here is the contents of smb.conf:
    > [global]
    > add machine script = /usr/sbin/useradd -c Machine -d
    > /var/lib/nobody -s /bin/false %m$
    > domain logons = No
    > domain master = No
    > passdb backend = smbpasswd
    > security = user
    > wins support = No
    > workgroup = workgroup
    > ldap suffix =
    > wins server =
    >
    > [PMG]
    > path = /home/PMG/share
    > read only = No
    > guest ok = Yes
    > force user = PMG
    >
    > ## Share disabled by YaST
    > # [netlogon]
    >
    > *****
    > The "share" folder share permissions have been enabled, and the
    > permissions allow read and write access to all. However, the samba
    > clients can read and not write to the folder /home/PMG/share.
    >

    Parthenolide;

    What are the Linux permissions on /home/PMG/share ?
    Code:
    ls -ld /home/PMG/share
    The nix permissions must also be satisfied to read or write a share.

    I would suggest you model the global section of /etc/samba/smb.conf on
    Swerdna's HowTo. In particular, why change the password backend from the
    default?, You should do something with the name resolve order and perhaps with
    a bad user.

    Make sure all samba users are created with
    Code:
    su
    smbpasswd -a <username>
    Each Samba username must be a valid linux user on the machine you are
    configuring, the password need not be the linux login password.

    Make sure that the samba server, samba client and netbios server are all
    allowed through the firewall.

    Make sure that both smbd and nmbd are set to start at boot.

    I'll be traveling for a few weeks, so someone else should jump in here if
    needed.

    --
    P. V.
    "We're all in this together, I'm pulling for you." Red Green

  9. #9
    Join Date
    Jun 2008
    Location
    Pacific Northwest
    Posts
    289

    Default Re: Cannot write to Samba shares

    The global section in the smb.conf file was set up by default. The PMG section was modeled from the swerdna tutorial page.

    ls -ld /home/PMG/share

    drwxrwxrwx 7 PMG users 4096 Sep 17 16:35 /home/PMG/share

    The smbpasswd command fails to add the user from the client site.
    The greatest obstacle to discovery is not ignorance, it is the illusion of knowledge.
    Daniel J. Boorstin US Patent Office

  10. #10
    Join Date
    Nov 2009
    Location
    ND, USA
    Posts
    1,036

    Default Re: Cannot write to Samba shares

    On 9/18/2011 8:06 PM, Parthenolide wrote:
    >
    > The global section in the smb.conf file was set up by default. The PMG
    > section was modeled from the swerdna tutorial page.
    >
    > ls -ld /home/PMG/share
    >
    > drwxrwxrwx 7 PMG users 4096 Sep 17 16:35 /home/PMG/share
    >
    > The smbpasswd command fails to add the user from the client site.
    >
    >

    parthenolide;

    Please follow Swerdna's HowTo. The default smb.conf that Yast sets up
    is not really very good for a workgroup environment. As to adding
    users, you first need to add the names as ordinary users to the server
    before creating Samba users with smbpasswd.

    My crystal ball is a bit cloudy, but I seem to see a faint image that
    looks like you have not properly added users. Thus the client tries to
    connect with a bad user and is rejected and the user is denied access.























    o. The YaST defaults are not really very good in a workgroup environment.

    --
    P.V.
    "We're all in this together, I'm pulling for you" Red Green

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •