1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-19 12:11:28 +00:00
nixpkgs/nixos/doc/manual
Klemens Nanni 8833983f26 nixos/users-groups: createHome: Ensure HOME permissions, fix description
configuration.nix(1) states

    users.extraUsers.<name>.createHome
        [...] If [...] the home directory already exists but is not
        owned by the user, directory owner and group will be changed to
        match the user.

i.e. ownership would change only if the user mismatched;  the code
however ignores the owner, it is sufficient to enable `createHome`:

    if ($u->{createHome}) {
        make_path($u->{home}, { mode => 0700 }) if ! -e $u->{home};
        chown $u->{uid}, $u->{gid}, $u->{home};
    }

Furthermore, permissions are ignored on already existing directories and
therefore may allow others to read private data eventually.

Given that createHome already acts as switch to not only create but
effectively own the home directory, manage permissions in the same
manner to ensure the intended default and cover all primary attributes.

Avoid yet another configuration option to have administrators make a
clear and simple choice between securely managing home directories
and optionally defering management to own code (taking care of custom
location, ownership, mode, extended attributes, etc.).

While here, simplify and thereby fix misleading documentation.
2020-12-16 03:40:29 +01:00
..
administration Merge pull request #98661 from doronbehar/doc/nixos/systemd-nixos-specific 2020-11-06 11:52:58 +01:00
configuration Merge pull request #78168 from active-group/subversion-apache-config-docs 2020-11-21 15:17:45 -05:00
development nixos/tests: expose both the interactive and non-interactive driver 2020-10-19 17:39:48 +02:00
installation nixos/manual: don't recommend nix-env -iA 2020-12-01 01:23:16 +00:00
release-notes nixos/users-groups: createHome: Ensure HOME permissions, fix description 2020-12-16 03:40:29 +01:00
.gitignore
contributing-to-this-manual.xml doc: Fix doc-building instructions 2020-11-11 11:22:29 -08:00
default.nix nixos/manual: make reproducible (#102234) 2020-10-31 21:18:16 +01:00
Makefile
man-configuration.xml nixos/doc: fix manpage format 2019-10-05 15:55:49 +00:00
man-nixos-build-vms.xml nixos/doc/*: editorconfig fixes 2020-07-31 15:08:54 +10:00
man-nixos-enter.xml nixos/doc: Improve code listings 2020-09-23 01:25:25 +02:00
man-nixos-generate-config.xml nixos/doc: fix manpage format 2019-10-05 15:55:49 +00:00
man-nixos-install.xml nixos-install: pass through keep-going flag 2020-10-31 17:13:45 +01:00
man-nixos-option.xml Merge pull request #75439 from Ma27/submodule-fixes-for-nixos-option 2020-02-01 10:00:59 +01:00
man-nixos-rebuild.xml doc/nixos-rebuild(8): add Nix --impure option to summary 2020-09-28 19:41:05 -04:00
man-nixos-version.xml nixos/doc: Improve code listings 2020-09-23 01:25:25 +02:00
man-pages.xml nixos/doc+manual: update copyright year range end 2019->2020 2020-01-14 07:01:39 -06:00
manual.xml nixos/doc: Mention how to contribute to it 2020-10-22 17:40:48 +03:00
preface.xml nixos manual: refer to nix and nixpkgs manuals 2019-10-30 10:25:09 +01:00
README nixos/doc: Mention how to contribute to it 2020-10-22 17:40:48 +03:00
shell.nix

Moved to: ./contributing-to-this-manual.xml. Link:

https://nixos.org/manual/nixos/unstable/#chap-contributing