Error uploading file: mkstemp(/opt/unit/tmp//req-XXXXXXXX) failed (13: Permission denied) #491
-
Hi folks! I'm running
Netbox is erroring when trying to create the temp file:
I am able to create the device type if I don't include an image. Interestingly, this issue doesn't happen locally but does happen in the container deployed in Nomad. I can solve this by running Is there some configuration I should change to fix this? Or any other ideas? Thank you 🙏 |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
I am not sure about the solution for
Far from perfect, but it works. |
Beta Was this translation helpful? Give feedback.
-
Its the same issue as defined here but for file path The issue is that using the default example in the ReadMe the Entrypoint runs as root where as the other processes are running as user This is what it should look like:
I have added This can also be fixed by using docker-compose to set the user to unit |
Beta Was this translation helpful? Give feedback.
-
Thanks for chiming in with some suggestions! For any Nomad users that come across this, I was able to "solve" this by running
and then in the If any Nomad users have a cleaner way to handle this, please reach out! |
Beta Was this translation helpful? Give feedback.
Thanks for chiming in with some suggestions! For any Nomad users that come across this, I was able to "solve" this by running
chmod
when the container starts up. I did this by adding this template stanza to the nomad job file for netbox:and then in the
task
>config
stanza, I changed the startup command tocommand = "/custom-startup.sh"
. This runs the custom script on startup and then runs the Netbox CMDexec /opt/netbox/launch-netbox.sh
. This does mean …