Это означает, что кто-то (пользователь, группа или каждый) имеет право на выполнение (или чтение или запись) сценария (или файла в целом).
Разрешения выражаются по-разному:
$ chmod +x file.py # makes it executable by anyone
$ chmod +w file.py # makes it writeabel by anyone
$ chmod +r file.py # makes it readably by anyone
$ chmod u+x file.py # makes it executable for the owner (user) of the file
$ chmod g+x file.py # makes it executable for the group (of the file)
$ chmod o+x file.py # makes it executable for the others (everybody)
Вы можете удалить разрешения таким же образом, просто замените +
на -
$ chmod o-x file.py # makes a file non-executable for the others (everybody)
$ ...
Восьмеричные числа выражают то же самое по-другому.
4 чтение, 2 письма, 1 исполнение.
простая математика:
read + execute = 5
read + write + execute = 7
execute + write = 3
...
собрал все в одну короткую и приятную команду:
# 1st digit: user permissions
# 2nd digit: group permissions
# 3rd digit: 'other' permissions
# add the owner all perms.,
# the group and other only write and execution
$ chmod 755 file.py