The `make install` script, which most users would run via `sudo` to install into `/usr/local`, will use the current umask of the root user when creating certain files and directories. If one uses a restrictive umask by default (e.g. `umask 077`), this means that only the root user will be able to use the full Bitcoin package.

**Expected behavior**

The install script creates all directories and files, including man pages, etc., with permissions `644` / `755`.

**Actual behavior**

Certain folders are created using the default umask, e.g.:

- /usr/local/share/man/man1/
- /usr/local/lib/pkgconfig/
- [...]

This means that only root can access files in these folders and other users won't be able to read the man pages (for example).

**To reproduce**

```bash
$ ./autogen.sh
$ make
$ sudo -iu root
% umask 077
% make install
```

**System information**

OS: Linux
bitcoind version: HEAD
if (g_zmq_notification_interface) {
        UnregisterValidationInterface(g_zmq_notification_interface);
        delete g_zmq_notification_interface;
        g_zmq_notification_interface = nullptr;
    }
#endif
    node.chain_clients.clear();
    UnregisterAllValidationInterfaces();
    GetMainSignals().UnregisterBackgroundSignalScheduler();
    node.kernel.reset();
    node.mempool.reset();
    node.fee_estimator.reset();
    node.chainman.reset();
    node.scheduler.reset();
    try {
        if (!fs::remove(GetPidFile(*node.args))) {
            LogPrintf("%s: Unable to remove PID file: File does not exist\n", __func__);
        }
    } catch (const fs::filesystem_error& e) {
        LogPrintf("%s: Unable to remove PID file: %s\n", __func__, fsbridge::get_filesystem_error_message(e));
    }
    LogPrintf("%s: done\n", __func__);
}
**
 * Signal handlers are very limited in what they are allowed to do.
 * The execution context the handler is invoked in is not guaranteed,
 * so we restrict handler operations to just touching variables:
 *
#ifndef WIN32
static void HandleSIGTERM(int)