Jump to content

Samba creates incorrect permissions on new directories

Go to solution Solved by njmyers3,

I think I figured it out.

You need to set

obey pam restrictions = yes

to 

Spoiler

obey pam restrictions = no

I hope this helps with anyone that has the same problem :) 

Hello everyone. I've been recently trying to set up a samba server for home file sharing. I'm trying to create a share that my whole family can access and write to, even if the file or directory isn't owned by them. For some reason Samba is ignoring my config (unless I did something wrong) and it is creating new directories with a 0750 permission, meaning that only the creator of the directory can put files in it. Any help would be appreciated, below is my samba config.

Spoiler

[global]
    encrypt passwords = yes
    security = user
    obey pam restrictions = yes
    os level = 20
    create mode = 0770
    passdb backend = tdbsam
    syslog = 0
    usershare allow guests = yes
    log file = /var/log/samba/log.%m
    server role = standalone server
    writeable = yes
    passwd program = /usr/bin/passwd %u
    force create mode = 0770
    netbios name = [removed]
    panic action = /usr/share/samba/panic-action %d
    directory mode = 0770
    max log size = 1000
    dns proxy = no
    server string = [removed]
    passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
    pam password change = yes
    workgroup = WORKGROUP
    force directory mode = 0770
    unix password sync = yes
    map to guest = bad user

 

[family]
    path = [removed]
    comment = [removed]
    valid users = [removed, but in syntax of "user1,user2,user3"]
    create mask = 0770
    force create mode = 0770
    directory mask = 0770
    force directory mode = 0770
    security mask = 0770
    force security mode = 0770
    directory security mask = 0770
    force directory security mode = 0770

#All of these permission settings should make the directory have 0770 permissions unless I did something wrong.

It also happens to files, I didn't realize that before.

39e29d11d9eb498187d782b905498f8f.png

 

My main computer:

i7 6700k || GTX 1070 || Asus Z170 RGB || C.M. Hyper 212 EVO || 16GB RAM || 256GB NVMe SSD || 500GB SATA SSD || 12TB total HDD || Define R5 Blackout || 850W PSU

More Details Below :) 

Spoiler

 

CPU: Intel Core i7 6700k                             GPU:  EVGA GTX 1070 FTW                                  |  Motherboard: Asus Z170 Pro Gaming Aura
CPU Cooler: C.M. Hyper 212 EVO             RAM: 16GB Kingston Fury 4x4 DDR4 2400MHz         SSD:  Intel 256GB NVMe SSD & Plextor 500GB SATA SSD

Hard Drive:  WD 2TB Black, 2TB WD Blue, 8TB WD Red     Case:  Fractal Design Define R5 Blackout Edition   PSU:  Be Quiet! Dark Power Pro 11 850W

 

Additional Computer Parts: NZXT Hue for LEDs

Peripherals: Dell U2414H (x2) || Corsair Sabre RGB || Corsair K95 Platinum || Sennheiser 558's || Modmic

 

Pictures of setup:

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

I think I figured it out.

You need to set

obey pam restrictions = yes

to 

Spoiler

obey pam restrictions = no

I hope this helps with anyone that has the same problem :) 

My main computer:

i7 6700k || GTX 1070 || Asus Z170 RGB || C.M. Hyper 212 EVO || 16GB RAM || 256GB NVMe SSD || 500GB SATA SSD || 12TB total HDD || Define R5 Blackout || 850W PSU

More Details Below :) 

Spoiler

 

CPU: Intel Core i7 6700k                             GPU:  EVGA GTX 1070 FTW                                  |  Motherboard: Asus Z170 Pro Gaming Aura
CPU Cooler: C.M. Hyper 212 EVO             RAM: 16GB Kingston Fury 4x4 DDR4 2400MHz         SSD:  Intel 256GB NVMe SSD & Plextor 500GB SATA SSD

Hard Drive:  WD 2TB Black, 2TB WD Blue, 8TB WD Red     Case:  Fractal Design Define R5 Blackout Edition   PSU:  Be Quiet! Dark Power Pro 11 850W

 

Additional Computer Parts: NZXT Hue for LEDs

Peripherals: Dell U2414H (x2) || Corsair Sabre RGB || Corsair K95 Platinum || Sennheiser 558's || Modmic

 

Pictures of setup:

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×