Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to create a Public folder that has full RW access. The problem with my configuration is that Windows users have no issues as guests (they can RW and Delete), my Ubuntu client can't do the same. We can only write and read, but not create or delete.

Here is the my smb.conf from my server:

[global]
    workgroup = WORKGROUP
    netbios name = FILESERVER
    server string = TurnKey FileServer

    os level = 20
    security = user
    map to guest = Bad Password
    passdb backend = tdbsam
    null passwords = yes

    admin users = root
    encrypt passwords = true
    obey pam restrictions = yes
    pam password change = yes
    unix password sync = yes
    passwd program = /usr/bin/passwd %u
    passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .

    add user script = /usr/sbin/useradd -m '%u' -g users -G users
    delete user script = /usr/sbin/userdel -r '%u'
    add group script = /usr/sbin/groupadd '%g'
    delete group script = /usr/sbin/groupdel '%g'
    add user to group script = /usr/sbin/usermod -G '%g' '%u'

    guest account = nobody

    syslog = 0
    log file = /var/log/samba/samba.log
    max log size = 1000

    wins support = yes
    dns proxy = no

    socket options = TCP_NODELAY
    panic action = /usr/share/samba/panic-action %d


[homes]
    comment = Home Directory
    browseable = no
    read only = no
    valid users = %S

[storage]
    create mask = 0777
    directory mask = 0777
    browseable = yes
    comment = Public Share
    writeable = yes
    public = yes
    path = /srv/storage

The following FSTAB entry doesn't yield full R/W access to the share.

//192.168.0.5/storage /media/myname/TK-Public/ cifs rw 0 0

This doesn't work either

//192.168.0.5/storage /media/myname/TK-Public/ cifs rw,guest,iocharset=utf8,file_mode=0777,dir_mode=0777,noperm 0 0

Using the following location in Nemo/Nautilus w/o the Share being mounted does work:

smb://192.168.0.5/storage/

Extra info. I just noticed that if I copy a file to the share after mounting, my Ubuntu client immediately make "nobody" be the owner, and the group "no group" has read and write, with everyone else as read-only.

enter image description here

What am I doing wrong?

share|improve this question
    
So, let me see: you can mount the share from your Ubuntu client (as root I assume given your fstab entries), you can then read and write, but you cannot delete or create? How come then that you can copy (for copying, creating a file is a must)? –  January Jun 27 '13 at 5:23

1 Answer 1

Turns out that I need to add a local (client) UID to the mount line in FSTAB to make this work. I arrived at this via sheer brute force:

//192.168.0.5/storage /media/myname/TK-Public/ cifs guest,uid=myuser,iocharset=utf8,file_mode=0777,dir_mode=0777,noperm 0 0
share|improve this answer
1  
A common problem, and no answer at all... Amazing! –  dan3 Nov 20 '13 at 10:39
    
Ohhh, just what I needed ... thanks a lot - looking for this for hours! –  pkdkk 13 hours ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.