1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 10:11:47 +02:00
No description
Find a file
Greg Price c4ce89f151
installer: Set files read-only when copying into store
After installing Nix, I found that all the files and directories
initially copied into the store were writable, with mode 644 or 755:

  drwxr-xr-x 9 root root 4096 Dec 31  1969 /nix/store/ddmmzn4ggz1f66lwxjy64n89864yj9w9-nix-2.3.3

The reason is that that's how they were in the unpacked tarball, and
the install-multi-user script used `rsync -p` without doing anything
else to affect the permissions.

The plain `install` script for a single-user install takes care to
do a `chmod -R a-w` on each store path copied.  We could do the same
here with one more command; or we can pass `--chmod` to rsync, to
have it write the files with the desired modes in the first place.

Tested the new `rsync` command on both a Linux machine with a
reasonably-modern rsync (3.1.3) and a Mac with its default, ancient,
rsync 2.6.9, and it works as expected on both.  Thankfully the latter
is just new enough to have `--chmod`, which dates to rsync 2.6.7.

(cherry picked from commit 26851dd2c2)
Signed-off-by: Domen Kožar <domen@dev.si>
2020-05-26 11:39:02 +02:00
.github Remove .github/FUNDING.yml 2019-07-23 15:21:23 +02:00
config update config/config.{sub,guess} 2018-08-13 20:00:17 +00:00
contrib function-trace: always show the trace 2020-01-05 16:30:32 +01:00
corepkgs nix-channel: Don't fetch binary-cache-url 2019-06-25 13:27:16 +02:00
doc/manual nixos.org/releases -> releases.nixos.org 2020-05-26 11:39:02 +02:00
m4 autoconf: Fix C++17 detection not working on Ubuntu 16.04. 2019-07-03 04:32:25 +02:00
maintainers Fix release script 2019-04-15 19:17:17 +02:00
misc Make nix-daemon.plist less fragile on macOS 2020-01-04 14:07:41 +01:00
mk mk/README.md: Remove 2020-03-13 15:07:42 +01:00
perl autoconf: Allow overriding CFLAGS/CXXFLAGS from outside. 2019-07-03 04:32:25 +02:00
scripts installer: Set files read-only when copying into store 2020-05-26 11:39:02 +02:00
src Fix PR_SET_PDEATHSIG results in Broken pipe (#2395) 2020-04-10 10:45:45 +02:00
tests function-trace: always show the trace 2020-01-05 16:30:32 +01:00
.dir-locals.el Add .dir-locals.el for Emacs 2016-01-28 11:12:04 +01:00
.editorconfig Add .editorconfig 2017-06-05 22:57:28 +01:00
.gitignore Treat plain derivation paths in context as normal paths. 2019-01-13 11:29:55 -05:00
.travis.yml Test the installer 2017-07-14 12:11:04 -04:00
.version Bump version 2020-04-10 15:05:30 +02:00
bootstrap.sh bootstrap: Simplify & make more robust. 2011-09-06 12:11:05 +00:00
configure.ac Revert 82b7f0e840, cd8bc06e87, c3db9e6f8f 2019-07-05 00:35:59 +02:00
COPYING * Change this to LGPL to keep the government happy. 2006-04-25 16:41:06 +00:00
local.mk Merge all nix-* binaries into nix 2018-10-26 12:54:00 +02:00
Makefile autoconf: Allow overriding CFLAGS/CXXFLAGS from outside. 2019-07-03 04:32:25 +02:00
Makefile.config.in Get BOOST_LDFLAGS from autoconf, fix Ubuntu 16.04 build. 2019-07-03 04:32:25 +02:00
nix.spec.in Remove world-writability from per-user directories 2019-10-09 23:57:25 +02:00
README.md README, error msg: http -> https 2020-05-26 11:39:02 +02:00
release-common.nix Build with large config Boehm GC 2020-02-18 18:02:58 +01:00
release.nix Build with large config Boehm GC 2020-02-18 18:02:58 +01:00
shell.nix Build with large config Boehm GC 2020-02-18 18:02:58 +01:00

Open Collective supporters

Nix, the purely functional package manager

Nix is a new take on package management that is fairly unique. Because of its purity aspects, a lot of issues found in traditional package managers don't appear with Nix.

To find out more about the tool, usage and installation instructions, please read the manual, which is available on the Nix website at https://nixos.org/nix/manual.

Contributing

Take a look at the Hacking Section of the manual. It helps you to get started with building Nix from source.

License

Nix is released under the LGPL v2.1

This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit.