Commit Graph

3 Commits

Author SHA1 Message Date
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
Bobby Rong
906b0b2e87
nixos/tests: fix all tests that uses wait_until_tty_matches 2022-06-04 12:22:03 +08:00
Federico Beffa
9fc01af1cc nixos/users-group: Add 'homeMode' option. 2022-04-11 13:16:38 +02:00