Permission problem (via Samba and docker) #5760

Closed
opened 2025-12-29 19:32:16 +01:00 by adam · 3 comments
Owner

Originally created by @piotsk on GitHub (Dec 10, 2021).

NetBox version

v3.1.0

Python version

3.9

Steps to Reproduce

Docker configuration:

  1. On the host mount samba share,ex: /mnt/netbox-media-files
  2. Create images via docker-compose and mount media directory to this mounted share from step 1:
    • /mnt/netbox-media-files:/opt/netbox/netbox/media
  3. Run containers and try to upload image of for example rack

Expected Behavior

properly uploaded image, the same as for normal mount (not samba)

Observed Behavior

<class 'PermissionError'>

[Errno 1] Operation not permitted: '/opt/netbox/netbox/media/image-attachments/rack_1_crkfsrtv002.PNG'

Python version: 3.9.5
NetBox version: 3.1.0

I checked permissions, etc. It's working when will mount to normal docker volume which is mount from the system not from samba.

Originally created by @piotsk on GitHub (Dec 10, 2021). ### NetBox version v3.1.0 ### Python version 3.9 ### Steps to Reproduce Docker configuration: 1. On the host mount samba share,ex: /mnt/netbox-media-files 2. Create images via docker-compose and mount media directory to this mounted share from step 1: - /mnt/netbox-media-files:/opt/netbox/netbox/media 3. Run containers and try to upload image of for example rack ### Expected Behavior properly uploaded image, the same as for normal mount (not samba) ### Observed Behavior <class 'PermissionError'> [Errno 1] Operation not permitted: '/opt/netbox/netbox/media/image-attachments/rack_1_crkfsrtv002.PNG' Python version: 3.9.5 NetBox version: 3.1.0 I checked permissions, etc. It's working when will mount to normal docker volume which is mount from the system not from samba.
adam closed this issue 2025-12-29 19:32:16 +01:00
Author
Owner

@piotsk commented on GitHub (Dec 10, 2021):

/mnt/netbox-media-files/image-attachments# ls -all
total 107
drwxrwxrwx 2 root root 0 Dec 10 14:15 .
drwxrwxrwx 2 root root 0 Nov 15 09:34 ..
-rwxrwxrwx 1 root root 108928 Dec 10 14:36 rack_1_crkfsrtv002.PNG

but anyway it's uploading the image, and it's there, simply application is not taking it

@piotsk commented on GitHub (Dec 10, 2021): /mnt/netbox-media-files/image-attachments# ls -all total 107 drwxrwxrwx 2 root root 0 Dec 10 14:15 . drwxrwxrwx 2 root root 0 Nov 15 09:34 .. -rwxrwxrwx 1 root root 108928 Dec 10 14:36 rack_1_crkfsrtv002.PNG but anyway it's uploading the image, and it's there, simply application is not taking it
Author
Owner

@piotsk commented on GitHub (Dec 10, 2021):

When will go to container itself, and will try to "touch" some file via it or something it's working.

@piotsk commented on GitHub (Dec 10, 2021): When will go to container itself, and will try to "touch" some file via it or something it's working.
Author
Owner

@jeremystretch commented on GitHub (Dec 10, 2021):

This is an issue with your installation, not a NetBox bug. Please consider opening a discussion under the netbox-docker project if you require assistance.

@jeremystretch commented on GitHub (Dec 10, 2021): This is an issue with your installation, not a NetBox bug. Please consider opening a discussion under the [netbox-docker project](https://github.com/netbox-community/netbox-docker/discussions) if you require assistance.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5760