I want to execute a python file in
sudo python myFile.py
Which works fine.
Now, I want to write the output to
So, I type:
sudo python myFile.py >> log.txt
However, I get the following error:
-bash: log.txt: Permission denied
Though I changed the permissions of log.txt:
sudo chmod u+x log.txt
ls -l log.txt returns:
-rwxr--r-- 1 www-data www-data 0 Feb 3 16:04 log.txt
How can I fix this?