Open alejandro-colomar opened 1 year ago
The solution, IMO, would be to run mkdir -p
instead, which will not modify existing directories, and will create new ones with reasonable defaults.
Maybe a better solution would be to test for existence, and if it doesn't exist, run install -d
, with which we can select the mode. This is especially important for NXT_TMP
, which we should make sure it exists (will add a separate patch for it).
Currently,
make install
is implemented as:If
$NXT_SBINDIR
or$NXT_STATE
represent a system directory, it will be modified to have the same permissions as if it were just created byinstall(1)
, overwriting any permissions (or even SELinux security contexts, ...) that were previously present. This can put the system in an unsafe or unstable state.The reason why
install -d
has this issue is described here: https://unix.stackexchange.com/questions/340169/whats-the-difference-between-mkdir-p-and-install-d.@ac000