- 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.