feat: create dedicated samba user
Also set samba share permissions to 0775 to allow users with `media` group to create files.
This commit is contained in:
parent
feb5e19694
commit
5fa9c0c87b
|
@ -15,7 +15,10 @@
|
||||||
"x-systemd.mount-timeout=5s"
|
"x-systemd.mount-timeout=5s"
|
||||||
|
|
||||||
"uid=1000"
|
"uid=1000"
|
||||||
|
"gid=100"
|
||||||
"credentials=${config.age.secrets.samba.path}"
|
"credentials=${config.age.secrets.samba.path}"
|
||||||
|
|
||||||
|
"nobrl"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,11 @@
|
||||||
# Use `smbpasswd -a <user>` to set passwords
|
# Use `smbpasswd -a <user>` to set passwords
|
||||||
# age.secrets.samba.file = ../../secrets/samba.age;
|
# age.secrets.samba.file = ../../secrets/samba.age;
|
||||||
|
|
||||||
|
users.users.samba = {
|
||||||
|
isSystemUser = true;
|
||||||
|
group = "media";
|
||||||
|
};
|
||||||
|
|
||||||
services.samba = {
|
services.samba = {
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
|
@ -19,9 +24,10 @@
|
||||||
public = "no";
|
public = "no";
|
||||||
browseable = "yes";
|
browseable = "yes";
|
||||||
writeable = "yes";
|
writeable = "yes";
|
||||||
"create mask" = "0644";
|
"valid users" = "felschr";
|
||||||
"directory mask" = "0755";
|
"create mask" = "0664";
|
||||||
"force user" = "felschr";
|
"directory mask" = "0775";
|
||||||
|
"force user" = "samba";
|
||||||
"force group" = "media";
|
"force group" = "media";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue