error when "+ attach an image" #1066

Closed
opened 2025-12-29 16:28:28 +01:00 by adam · 6 comments
Owner

Originally created by @miklasz on GitHub (Jun 30, 2017).

Hi, when attache image (in rack page) and click create i get error msg:

<type 'exceptions.OSError'>

[Errno 13] Permission denied: '/opt/netbox/netbox/media/image-attachments/rack_43_ll.png'

not sure if its bug?

I use puppet to build netbox vm, but proces in general is the same to your website tutorial, if you require any more information please let me know and I will provide.

many thanks

Bartosz

Issue type:

Python version:
NetBox version:

Originally created by @miklasz on GitHub (Jun 30, 2017). Hi, when attache image (in rack page) and click create i get error msg: <type 'exceptions.OSError'> [Errno 13] Permission denied: '/opt/netbox/netbox/media/image-attachments/rack_43_ll.png' not sure if its bug? I use puppet to build netbox vm, but proces in general is the same to your website tutorial, if you require any more information please let me know and I will provide. many thanks Bartosz <!-- Please note: GitHub issues are to be used only for feature requests and bug reports. For installation assistance or general discussion, please join us on the mailing list: https://groups.google.com/forum/#!forum/netbox-discuss Please indicate "bug report" or "feature request" below. Be sure to search the existing set of issues (both open and closed) to see if a similar issue has already been raised. --> ### Issue type: <!-- If filing a bug, please indicate the version of Python and NetBox you are running. (This is not necessary for feature requests.) --> **Python version:** **NetBox version:** <!-- If filing a bug, please record the exact steps taken to reproduce the bug and any errors messages that are generated. If filing a feature request, please precisely describe the data model or workflow you would like to see implemented, and provide a use case. -->
adam closed this issue 2025-12-29 16:28:29 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jun 30, 2017):

You need to make sure that your media path (e.g. /opt/netbox/netbox/media/) is writable by the user NetBox runs as. The error is occurring because NetBox doesn't have permission to write files to that path.

@jeremystretch commented on GitHub (Jun 30, 2017): You need to make sure that your media path (e.g. /opt/netbox/netbox/media/) is writable by the user NetBox runs as. The error is occurring because NetBox doesn't have permission to write files to that path.
Author
Owner

@ScrimForever commented on GitHub (Jan 19, 2018):

Hello... this happened with me too. I change folder permission to www-data and done !

@ScrimForever commented on GitHub (Jan 19, 2018): Hello... this happened with me too. I change folder permission to www-data and done !
Author
Owner

@ScrimForever commented on GitHub (Jan 19, 2018):

chown -R www-data folder(media)

@ScrimForever commented on GitHub (Jan 19, 2018): chown -R www-data folder(media)
Author
Owner

@LBegnaud commented on GitHub (Jan 19, 2018):

and a permanent fix would be to move it out of the netbox folder and set the MEDIA_ROOT configuration variable.

@LBegnaud commented on GitHub (Jan 19, 2018): and a permanent fix would be to move it out of the netbox folder and set the `MEDIA_ROOT` configuration variable.
Author
Owner

@ScrimForever commented on GitHub (Jan 19, 2018):

@jeremystretch can you reopen this ticket and change status to feature ?

@ScrimForever commented on GitHub (Jan 19, 2018): @jeremystretch can you reopen this ticket and change status to feature ?
Author
Owner

@cimnine commented on GitHub (Jan 22, 2018):

@ScrimForever this is already possible. See https://github.com/digitalocean/netbox/blob/develop/netbox/netbox/configuration.example.py#L101

@cimnine commented on GitHub (Jan 22, 2018): @ScrimForever this is already possible. See https://github.com/digitalocean/netbox/blob/develop/netbox/netbox/configuration.example.py#L101
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1066