Search code examples
pythonubuntuflaskmkdirs

Flask Python mkdirs returns "Permission denied" over mounted drive


I have an app that creates directories on a mounted SMB network drive, but the app is returning "Permission denied" errors. If I run the same code locally as sudo it works just fine.

I'm utilizing Gunicorn, Supervisor, & Nginx on the server and I'm assuming that I need to set permissions somewhere for my app to work properly. But I'm unsure where that is.

For context I've been using the Flask Mega Tutorial as a guide, but because my app has different functionality it didn't really address some specific needs such as this. I'm hoping someone could provide me with some more guidance.

Update: Seems this issue had to do with the SMB being mounted without the proper permissions.


Solution

  • Just to get this marked as solved.

    The issue was with the fstab file that holds the configuration for the SMB mount. The domain name wasn't added properly