I have a Django application that access a remote directory mounted with sshfs to upload files. The Django application has to read those files as well. The setup is running fine with the Django server (runserver). I suppose that this is because the Django server runs as the current user and therefore it has access to the remote mount. However, when the same application runs on Apache server I cannot access the remote mounted directory. I assume that this could be because Apache daemon tries to access the folder as www-data user which will not have access to the remote folder since it is not the user which created the mount.
So the question is, how can I overcome this? I've added the directive:
WSGIDaemonProcess my.server.com user=myuser group=mygroup
to the current-site.conf
file in a hope that if the python process runs as myuser
then the access should be the same as with the Django server, but it doesn't help.
Any ideas?