Open
Description
Current Behavior
When uploading a report, the following error appears:
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.
<class 'PermissionError'>
[Errno 13] Permission denied: '/opt/netbox/netbox/reports/example.py'
Python version: 3.11.4
NetBox version: 3.6.1
Plugins: None installed
Issue located, insufficient rights on the _data folder
root@debian-docker:~# ls -al /var/lib/docker/volumes/netbox-docker_netbox-reports-files/
total 12
drwx-----x 3 root root 4096 May 11 16:29 .
drwx-----x 11 root root 4096 Sep 15 14:21 ..
drwxr-xr-x 3 root root 4096 Sep 15 13:51 _data
Expected Behavior
Upload possible after changing the folder _data
root@debian-docker:~# chmod 775 /var/lib/docker/volumes/netbox-docker_netbox-reports-files/_data/
root@debian-docker:~# ls -al /var/lib/docker/volumes/netbox-docker_netbox-reports-files/
total 12
drwx-----x 3 root root 4096 May 11 16:29 .
drwx-----x 11 root root 4096 Sep 15 14:21 ..
drwxrwxr-x 3 root root 4096 Sep 15 13:51 _data
Docker Compose Version
Docker Compose version v2.21.0
Docker Version
Client: Docker Engine - Community
Version: 24.0.6
API version: 1.43
Go version: go1.20.7
Git commit: ed223bc
Built: Mon Sep 4 12:32:16 2023
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 24.0.6
API version: 1.43 (minimum version 1.12)
Go version: go1.20.7
Git commit: 1a79695
Built: Mon Sep 4 12:32:16 2023
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.22
GitCommit: 8165feabfdfe38c65b599c4993d227328c231fca
runc:
Version: 1.1.8
GitCommit: v1.1.8-0-g82f18fe
docker-init:
Version: 0.19.0
GitCommit: de40ad0
The git Revision
The git Status
On branch release
Your branch is up to date with 'origin/release'.
Startup Command
docker compose up -d
NetBox Logs
netbox | 127.0.0.1 - - [15/Sep/2023:13:27:02 +0000] "GET /api/ HTTP/1.1" 200 510 "-" "curl/7.88.1"
netbox | 172.30.0.6 - - [15/Sep/2023:13:27:03 +0000] "POST /extras/reports/add/ HTTP/1.1" 500 1867 "https://10.127.103.157/extras/reports/add/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36"
netbox | 172.30.0.6 - - [15/Sep/2023:13:27:03 +0000] "GET /static/netbox-light.css HTTP/1.1" 200 232798 "https://10.127.103.157/extras/reports/add/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36"
Content of docker-compose.override.yml
version: '3.4'
services:
# netbox
netbox:
container_name: netbox
environment:
TIME_ZONE: "Europe/Brussels"
restart: unless-stopped
Metadata
Metadata
Assignees
Labels
No labels