I'm trying to create a python shell script to create a number of directories in Ubuntu Linux. The main directory I'm trying to create directories in is protected from write access. Is there a way to allow the Python script to be allowed to create directories in there as if it's the root user but not have to run the script through su, since other users might need to run the script but should not have su access?
You could add a user just for this task, then give the said user permissions for the directory you want the subdirectories created in and execute the script as the said user.
There might be easier solutions but that's what comes to my mind at first glance.
How do you allow a Python script access to mkdir in a protected directory without su access in Linux?