Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change file permission for all users in R

Tags:

chmod

r

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 ?

like image 524
statquant Avatar asked Feb 25 '14 20:02

statquant


Video Answer


1 Answers

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')
like image 106
eddi Avatar answered Sep 28 '22 00:09

eddi