6

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 ?

statquant
  • 13,672
  • 21
  • 91
  • 162

1 Answers1

9

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')
eddi
  • 49,088
  • 6
  • 104
  • 155