Unable to upload pictures to device types #11466

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

Originally created by @gunpowder62 on GitHub (Aug 9, 2025).

Deployment Type

Self-hosted

NetBox Version

v4.3.5

Python Version

3.12

Steps to Reproduce

  1. Edit device type
  2. Select file for upload
  3. Save

Docker Compose Volume section:

volumes:
  - type: volume
    source: netbox_data
    target: /etc/netbox/config
    volume:
      subpath: config
      nocopy: true
  - type: volume
    source: netbox_data
    target: /opt/netbox/netbox/media
    volume:
      subpath: media
      nocopy: true
  - type: volume
    source: netbox_data
    target: /opt/netbox/netbox/reports
    volume:
      subpath: reports
      nocopy: true
  - type: volume
    source: netbox_data
    target: /opt/netbox/netbox/scripts
    volume:
      subpath: scripts
      nocopy: true

Expected Behavior

File is stored successful in media folder for devie-types

Observed Behavior

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: '/etc/netbox/media'

Python version: 3.12.3
NetBox version: 4.3.5-Docker-3.3.0
Plugins: None installed

If further assistance is required, please post to the NetBox discussion forum on GitHub.

Originally created by @gunpowder62 on GitHub (Aug 9, 2025). ### Deployment Type Self-hosted ### NetBox Version v4.3.5 ### Python Version 3.12 ### Steps to Reproduce 1. Edit device type 2. Select file for upload 3. Save Docker Compose Volume section: volumes: - type: volume source: netbox_data target: /etc/netbox/config volume: subpath: config nocopy: true - type: volume source: netbox_data target: /opt/netbox/netbox/media volume: subpath: media nocopy: true - type: volume source: netbox_data target: /opt/netbox/netbox/reports volume: subpath: reports nocopy: true - type: volume source: netbox_data target: /opt/netbox/netbox/scripts volume: subpath: scripts nocopy: true ### Expected Behavior File is stored successful in media folder for devie-types ### Observed Behavior 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: '/etc/netbox/media' Python version: 3.12.3 NetBox version: 4.3.5-Docker-3.3.0 Plugins: None installed If further assistance is required, please post to the NetBox discussion forum on GitHub.
adam added the netbox label 2025-12-29 21:45:37 +01:00
adam closed this issue 2025-12-29 21:45:37 +01:00
Author
Owner

@gunpowder62 commented on GitHub (Aug 9, 2025):

Hello, I found the solution by using the env variable MEDIA_ROOT. I overlooked this. Issue can be closed

@gunpowder62 commented on GitHub (Aug 9, 2025): Hello, I found the solution by using the env variable MEDIA_ROOT. I overlooked this. Issue can be closed
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11466