开发者

How to change file access permissions in linux?

开发者 https://www.devze.com 2023-03-27 14:35 出处:网络
How开发者_JS百科 does one change file access permissions? f = open(\'test\',\'w\') f.close() Defaults access permissions: 10600You can use os.chmod

How开发者_JS百科 does one change file access permissions?

f = open('test','w')
f.close()

Defaults access permissions: 10600


You can use os.chmod

os.chmod(path, mode)

You probably want to use an octal integer literal, like 0777 for the mode.


Use os.chmod(path, mode)

0

精彩评论

暂无评论...
验证码 换一张
取 消