Server error when uploading device image #1115

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

Originally created by @benwut on GitHub (Jul 18, 2017).

Hello,

When I attach an image on a device I got this error :
image

I was in 2.0.9 netbox version and upgrade using the "upgrade.sh" script to 2.0.10 today.
It was the first time I attached an image to a device, never tried in 2.0.9 so I can't tell if it is since this update.

Here's the rights on the "image-attachments" rights :

root@netbox:/opt/netbox/netbox/media/image-attachments# ls -la
total 12
drwxr-xr-x 2 root root 4096 Jul 10 22:21 .
drwxr-xr-x 3 root root 4096 Jul 10 22:21 ..
-rw-r--r-- 1 root root   14 Jul 10 22:21 .gitignore

Netbox version: 2.0.10
Python version: 3.5.3
OS: Debian 9 4.9.0-3-amd64

Originally created by @benwut on GitHub (Jul 18, 2017). Hello, When I attach an image on a device I got this error : ![image](https://user-images.githubusercontent.com/14860737/28337594-5f944232-6c06-11e7-8397-99b6beb74f28.png) I was in 2.0.9 netbox version and upgrade using the "upgrade.sh" script to 2.0.10 today. It was the first time I attached an image to a device, never tried in 2.0.9 so I can't tell if it is since this update. Here's the rights on the "image-attachments" rights : root@netbox:/opt/netbox/netbox/media/image-attachments# ls -la total 12 drwxr-xr-x 2 root root 4096 Jul 10 22:21 . drwxr-xr-x 3 root root 4096 Jul 10 22:21 .. -rw-r--r-- 1 root root 14 Jul 10 22:21 .gitignore Netbox version: 2.0.10 Python version: 3.5.3 OS: Debian 9 4.9.0-3-amd64
adam closed this issue 2025-12-29 16:29:08 +01:00
Author
Owner

@LBegnaud commented on GitHub (Jul 18, 2017):

you need to chown the directory for whatever user the django app runs as, for me that is the netbox user:
chown -R netbox:netbox /opt/netbox/netbox/media/image-attachments

@LBegnaud commented on GitHub (Jul 18, 2017): you need to chown the directory for whatever user the django app runs as, for me that is the netbox user: `chown -R netbox:netbox /opt/netbox/netbox/media/image-attachments`
Author
Owner

@Bill-Irvine commented on GitHub (Jul 19, 2017):

https://netbox.readthedocs.io/en/latest/data-model/extras/#image-attachments

@Bill-Irvine commented on GitHub (Jul 19, 2017): https://netbox.readthedocs.io/en/latest/data-model/extras/#image-attachments
Author
Owner

@jeremystretch commented on GitHub (Jul 19, 2017):

Agreed, seems like a simple permissions issue. Closing this out.

@jeremystretch commented on GitHub (Jul 19, 2017): Agreed, seems like a simple permissions issue. Closing this out.
Author
Owner

@benwut commented on GitHub (Jul 19, 2017):

Oops sorry guys :|

@benwut commented on GitHub (Jul 19, 2017): Oops sorry guys :|
Author
Owner

@sayching commented on GitHub (Jan 20, 2018):

@benwut how did you solve this problem? Now I'm facing this problem too. And I'm a newbie in this field please help me. Thank you! :)

@sayching commented on GitHub (Jan 20, 2018): @benwut how did you solve this problem? Now I'm facing this problem too. And I'm a newbie in this field please help me. Thank you! :)
Author
Owner

@benwut commented on GitHub (Jan 20, 2018):

Hello @sayching, I solved the issue by doing what @LBengaud said in first answer.

@benwut commented on GitHub (Jan 20, 2018): Hello @sayching, I solved the issue by doing what @LBengaud said in first answer.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1115