Unable to upload images even after taking ownership of /media #2018

Closed
opened 2025-12-29 17:21:31 +01:00 by adam · 1 comment
Owner

Originally created by @astrugatch on GitHub (Sep 20, 2018).

Environment

  • Python version: 3.5.2
  • NetBox version: 2.4.4

Steps to Reproduce

Clean install of 2.4.4 on Ubuntu 16.0.4, sudo chown -R netbox:netbox /opt/netbox/netbox/media/ run

Upload images to netbox

A file permission error was detected while processing this request. Common causes include the following:

Insufficient write permission to the media root - The configured media root is . Ensure that the user NetBox runs as has access to write files to all locations within this path.

The complete exception is provided below:

<class 'PermissionError'>

[Errno 13] Permission denied: '/opt/netbox/netbox/media/image-attachments/site_3_EvergreenNetwork_-_Page_1.jpeg'
If further assistance is required, please post to the NetBox mailing list.

Originally created by @astrugatch on GitHub (Sep 20, 2018). <!-- NOTE: This form is only for reproducible bugs. If you need assistance with NetBox installation, or if you have a general question, DO NOT open an issue. Instead, post to our mailing list: https://groups.google.com/forum/#!forum/netbox-discuss Please describe the environment in which you are running NetBox. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report. --> ### Environment * Python version: 3.5.2 * NetBox version: 2.4.4 <!-- Describe in detail the steps that someone else can take to reproduce this bug using the current stable release of NetBox (or the current beta release where applicable). --> ### Steps to Reproduce Clean install of 2.4.4 on Ubuntu 16.0.4, sudo chown -R netbox:netbox /opt/netbox/netbox/media/ run <!-- What did you expect to happen? --> Upload images to netbox <!-- What happened instead? --> A file permission error was detected while processing this request. Common causes include the following: Insufficient write permission to the media root - The configured media root is . Ensure that the user NetBox runs as has access to write files to all locations within this path. The complete exception is provided below: <class 'PermissionError'> [Errno 13] Permission denied: '/opt/netbox/netbox/media/image-attachments/site_3_EvergreenNetwork_-_Page_1.jpeg' If further assistance is required, please post to the NetBox mailing list.
adam closed this issue 2025-12-29 17:21:31 +01:00
Author
Owner

@astrugatch commented on GitHub (Sep 21, 2018):

Needed to chown with www-data:www-data.

@astrugatch commented on GitHub (Sep 21, 2018): Needed to chown with www-data:www-data.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2018