simpsonstv icon indicating copy to clipboard operation
simpsonstv copied to clipboard

Permission denied when running the script

Open Villiem opened this issue 3 years ago • 0 comments

When I typed sudo python encode.py the script creates a folder as root, which can´t be accessed by a normal user. The full explanation can be found here https://stackoverflow.com/questions/24023202/how-do-i-avoid-creating-folders-as-root-when-running-a-python-script-under-sudo

The solution is simple, create the encoded folder before running the script, this also allows you to run the script without sudo.

I still think the script should be changed to be compatible with os.chown()

Thanks!

Villiem avatar Nov 17 '22 07:11 Villiem