Chmod issue to change file permission using python

后端 未结 3 2029
别跟我提以往
别跟我提以往 2021-01-03 04:37

I am looking to change the file permission to all files to read write and execute for all the users in a directory using a python script. However, after running the script w

3条回答
  •  北荒
    北荒 (楼主)
    2021-01-03 05:34

    According to the NOTE of the os.chmod documentation:

    Although Windows supports chmod(), you can only set the file's read-only flag with it (via the stat.S_IWRITE and stat.S_IREAD constants or a corresponding integer value). All other bits are ignored.

提交回复
热议问题