您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息
免费发信息
三六零分类信息网 > 平凉分类信息网,免费分类信息发布

python设置文件权限 答案全全给你奉上

2023/4/12 22:21:27发布44次查看
1、os.chmod()方法 此方法通过数值模式更新路径或文件权限。该模式可采取下列值或按位或运算组合之一:
stat.s_isuid: set user id on execution.
stat.s_isgid: set group id on execution.
stat.s_enfmt: record locking enforced.
stat.s_isvtx: save text image after execution.
stat.s_iread: read by owner.
stat.s_iwrite: write by owner.
stat.s_iexec: execute by owner.
stat.s_irwxu: read, write, and execute by owner.
stat.s_irusr: read by owner.
stat.s_iwusr: write by owner.
stat.s_ixusr: execute by owner.
stat.s_irwxg: read, write, and execute by group.
stat.s_irgrp: read by group.
stat.s_iwgrp: write by group.
stat.s_ixgrp: execute by group.
stat.s_irwxo: read, write, and execute by others.
stat.s_iroth: read by others.
stat.s_iwoth: write by others.
stat.s_ixoth: execute by others.
2、语法:
os.chmod(path, mode);
3、参数:
path: this is the path for which mode would be set.
mode: this may take one of the above mentioned values or bitwise oredcombinations of them:
平凉分类信息网,免费分类信息发布

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录