Installation assumes stock umask #5941

Closed
opened 2025-12-29 19:34:32 +01:00 by adam · 2 comments
Owner

Originally created by @joubbi on GitHub (Jan 14, 2022).

NetBox version

v3.1.5

Python version

3.9

Steps to Reproduce

It is quite common to change the default umask on a system to something that restricts file permissions for "other".
This is for example a part of CIS hardening "Ensure default user umask is 027 or more restrictive".
The installation of Netbox fails if "other" is not able to read the files.

In my opinion the persmissions and users set by Netbox should be set in a way that works with umask 027.
If this is not possbile for some reason the upgrade script should fail with an explanation if the umask is set in a too restrictive way.
Also the installation instructions should have a section in the beginning to check the umask.

  1. Set umask to 0027.
  2. Follow the installation insructions.

Expected Behavior

The installation should succeed, or possibly fail with an error message in an earlier stage encouraging the user to change the umask.

Observed Behavior

The installation fails when trying to start the service with sudo systemctl start netbox netbox-rq.
The explanation for the failure can be seen in /var/log/messages -> Permision denied.

Originally created by @joubbi on GitHub (Jan 14, 2022). ### NetBox version v3.1.5 ### Python version 3.9 ### Steps to Reproduce It is quite common to change the default umask on a system to something that restricts file permissions for "other". This is for example a part of CIS hardening "Ensure default user umask is 027 or more restrictive". The installation of Netbox fails if "other" is not able to read the files. In my opinion the persmissions and users set by Netbox should be set in a way that works with umask 027. If this is not possbile for some reason the upgrade script should fail with an explanation if the umask is set in a too restrictive way. Also the installation instructions should have a section in the beginning to check the umask. 1. Set umask to 0027. 2. Follow the installation insructions. ### Expected Behavior The installation should succeed, or possibly fail with an error message in an earlier stage encouraging the user to change the umask. ### Observed Behavior The installation fails when trying to start the service with `sudo systemctl start netbox netbox-rq`. The explanation for the failure can be seen in `/var/log/messages` -> Permision denied.
adam closed this issue 2025-12-29 19:34:32 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jan 14, 2022):

The installation instructions assumes stock everything, because we couldn't possibly account for all potential modifications that may have been made to a system. This ensures a consistent experience and reduces the burden of maintaining the installation documentation. The installer is presumed to be aware of any modifications that have been made to the system on which NetBox is being installed and account for them appropriately.

@jeremystretch commented on GitHub (Jan 14, 2022): The installation instructions assumes stock _everything_, because we couldn't possibly account for all potential modifications that may have been made to a system. This ensures a consistent experience and reduces the burden of maintaining the installation documentation. The installer is presumed to be aware of any modifications that have been made to the system on which NetBox is being installed and account for them appropriately.
Author
Owner

@joubbi commented on GitHub (Jan 14, 2022):

The way it is now leaves the installer in the dark.
The instructions don't mention that the file permissions for other are used.
When it fails, it's not clear why it fails.

I can imagine several others spending time troubleshooting this same issue.

@joubbi commented on GitHub (Jan 14, 2022): The way it is now leaves the installer in the dark. The instructions don't mention that the file permissions for other are used. When it fails, it's not clear why it fails. I can imagine several others spending time troubleshooting this same issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5941