I am creating a Django application that can access the user's home directory. For this, I want to create a directory using something like os.mkdir('/home/user/new_directory')or subprocess commands.
Since Django is started by the apache server, python acts as an apache user and cannot access my users' home directories.
Currently, I know the login of my users because they must be registered on the website. Is there a solution to execute unix commands from Django / Python in the username ?
source
share