Find the answer to your Linux question:
Results 1 to 3 of 3
For some reason that I can't seem to get resolved, newly created files on a share are read-only to all other users except the owner by default. I've read through ...
  1. #1
    Just Joined!
    Join Date
    May 2007
    Location
    Iowa
    Posts
    3

    Newly Created Files are Read-Only....

    For some reason that I can't seem to get resolved, newly created files on a share are read-only to all other users except the owner by default. I've read through the Samba docs till I'm blue and tried so many different settings that I'm starting to get confused.. Once the file has been created, the windows user (owner) can right-click on it, select properties, and then the security tab and grant all users permission to access the file by selecting "Domain\users" and checking the appropriate rights. But I'd rather they not have to do that.

    Can someone tell me how to set Samba 3 (or WinXP) so that my windows XP clients will default to creating new files that are available to all users in the samba share named COMMON?

    Here is my current SMB.CONF


    [global]
    workgroup = KW-NET
    netbios name = MADMAX
    server string = Samba Server
    passdb backend = smbpasswd
    printcap name = cups
    show add printer wizard = No
    add user script = /usr/sbin/useradd -m '%u'
    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'
    add machine script = /usr/sbin/useradd -s /bin/false -d /var/lib/nobody '%u'
    logon script = scripts\%U.bat
    logon path =
    logon drive = L:
    domain logons = Yes
    os level = 65
    preferred master = Yes
    domain master = Yes
    idmap uid = 1500-20000
    idmap gid = 15000-20000
    printing = cups
    usershare allow guests = YES
    local master = Yes
    security = user
    encrypt passwords = yes

    [homes]
    comment = Home Directories
    valid users = %S
    read only = No
    browseable = No

    [netlogon]
    comment = Network Logon Service
    path = /var/lib/samba/netlogon
    admin users = root, lynbor
    guest ok = Yes
    browseable = No
    write list = root

    [common]
    comment = All Share
    path = /common/
    guest ok = Yes
    valid users = @users,@root
    read only = No
    browseable = Yes
    inherit acls = Yes

    I've tried the above with "inherit acls" line removed also.
    I've used chown and chmod to set all folders to belong to user root and group users and everyone is a member of group users. I've also set the permissions on all existing to rw (chmod -R a=rw *) It's like the group permissions are not being used by the system.

    I have also mapped the unix groups to the ntgroups. Geezz, nothing is making a difference..

    Any and all help would be greatly appreciated. I'm just out of ideas.

  2. #2
    Linux Engineer Zelmo's Avatar
    Join Date
    Jan 2006
    Location
    Riverton, UT, USA
    Posts
    1,001
    How about the "create mask" and "directory mask" (reference)? It looks like they have the same effect as umask, but the numbering may be opposite (i.e., it actually represents permissions, judging by the example given in the link).
    Stand up and be counted as a Linux user!

  3. #3
    Just Joined!
    Join Date
    May 2007
    Location
    Iowa
    Posts
    3

    That Worked!

    Quote Originally Posted by Zelmo View Post
    How about the "create mask" and "directory mask" (reference)? It looks like they have the same effect as umask, but the numbering may be opposite (i.e., it actually represents permissions, judging by the example given in the link).
    That's exactly what I needed. I had looked through the command listing and not seen those two commands or perhaps I was reading to quickly and scanned over them. But I plugged them in and the problem is now resolved. Thanks a bunch!

Posting Permissions

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