如何更改R中所有用户的文件权限 [英] How to change file permission for all users in R

查看:61
本文介绍了如何更改R中所有用户的文件权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用 Sys.chmod(file,'777')时,似乎仅对所有者而非所有用户更改了权限,我该怎么做?

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 ?

推荐答案

Sys.chmod 中禁用umask检查以获取所需内容:

Disable the umask check in Sys.chmod to get what you want:

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

或者直接使用 system :

system('chmod 777 file')

这篇关于如何更改R中所有用户的文件权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆