def add_exec(file_path):
"""Add execution rights for user, group and others to the given file"""
print("change permissions")
# change Permission with bitwies or and the constants from stat modul
os.chmod(file_path, stat.S_IRUSR | stat.S_IWUSR| stat.S_IXUSR | \
stat.S_IRGRP | stat.S_IXGRP | stat.S_IROTH | stat.S_IXOTH)
# global vars are very bad but I think the only solution for this
评论列表
文章目录