问题
When I use Sys.chmod(file,'777')
it looks like the permission is changed only for the owner and not for all users, how can I do this ?
回答1:
Disable the umask check in Sys.chmod
to get what you want:
Sys.chmod(file, "777", use_umask = FALSE)
Alternatively use system
directly:
system('chmod 777 file')
来源:https://stackoverflow.com/questions/22025026/how-to-change-file-permission-for-all-users-in-r