Error happens while applying "chmod" to tmp file
- OS: Centos7
- Language: Python
- Related Code:
os.system('chmod g+w %s' % path)
-
Description:
- I want to run this command after creating a file
- But when I edit and save the existing file, the OS will create the
.tmp
file like~gvfSFkS.tmp
and then move,this isrename
,thetmp
file to override the file that was edited. - Here is the INFO the shell giving
`chmod: cannot access ‘/home/share/private/student/aa/~gvfSFkS.tmp’: No such file or directory
-
What I want to know
- The season why it happens?
- How I can apply
chmod
commad to such kind files.
- Others
I want this python script as root.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论