How to change file resolution for all users in R

When I use Sys.chmod(file,'777'), it seems that the permission is changed only for the owner, and not for all users, how can I do this?

+3
source share
1 answer

Turn off umask's check Sys.chmodto get what you want:

Sys.chmod(file, "777", use_umask = FALSE)

Alternatively use systemdirectly:

system('chmod 777 file')
+5
source

All Articles