I'm running a Python script on a fresh installation of Ubuntu 20.04.2. The script checks if a directory exists and creates it if not. The code is:
os.makedirs(f'..{os.sep}logs{os.sep}')
I get the following error:
PermissionError: [Errno 13] Permission denied: '../logs/'
In the command prompt, I would just add a sudo but I need my Python script to be able to make these directories so, my question is how can I allow Python to make new directories?