How to change file permission for all users in R

久未见 提交于 2021-01-27 07:41:49

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!