some_file.py:
#! /usr/bin/python
print("Hello World!")
On terminal:
sudo chown +x some_file.py
chown: invalid user: ‘+x’
I want to make the file executable.
some_file.py:
#! /usr/bin/python
print("Hello World!")
On terminal:
sudo chown +x some_file.py
chown: invalid user: ‘+x’
I want to make the file executable.
The chown
command stands for change ownership. That's why you get invalid user: ‘+x’, because it was expecting a user as input.
If you want to change permissions of a file you must use the chmod
command. To make a file executable for the user owner of that file you could try
chmod u+x some_file.py