1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/nixos/modules/config
Tom Butler e7e8ad1e35
nixos: Set home directory parent tree permissions to 0755
When the user's home directory is created using `createHome` e.g.

```
users.users.alice = {
    home = "/users/alice";
    createHome = true;
};
```

The `/users` directory was created with the same permissions as `/users/alice`, `0700` by default.

The parent directory `/users` permissions results in `createHome` creating a home directory that is inaccessible to the user:

```
$ su alice
$ cd /user/alice
cd: permission denied: /users/alice
```

The underlying cause is `make_path($u->{home}, { mode => oct($u->{homeMode}) })` which sets, in the example above`, `/users` to `0700`. Instead it should be `0755` like other system directories `/var`, `/dev`, etc.
2024-07-09 23:09:09 +02:00
..
fonts
gtk
xdg
appstream.nix
console.nix
debug-info.nix
fanout.nix
i18n.nix
iproute2.nix
ldap.nix
ldso.nix
locale.nix
malloc.nix
mysql.nix
networking.nix
nix-channel.nix
nix-flakes.nix
nix-remote-build.nix
nix.nix
no-x-libs.nix
nsswitch.nix
power-management.nix
pulseaudio.nix
qt.nix
resolvconf.nix
shells-environment.nix
stevenblack.nix nixos/stevenblack: rework to use distinct package outputs 2024-07-05 23:30:26 -04:00
stub-ld.nix
swap.nix
sysctl.nix
system-environment.nix
system-path.nix
terminfo.nix
unix-odbc-drivers.nix
update-users-groups.pl nixos: Set home directory parent tree permissions to 0755 2024-07-09 23:09:09 +02:00
users-groups.nix
vte.nix
zram.nix