- OS: Centos7
- Language: Python
- Related Code:
os.system('chmod g+w %s' % path)
- I want to run this command after creating a file
- But when I edit and save the existing file, the OS will create the
~gvfSFkS.tmpand then move，this is
tmpfile 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
chmodcommad to such kind files.
I want this python script as root.