Is setting umask to 000 dangerous 您所在的位置:网站首页 umask0000 Is setting umask to 000 dangerous

Is setting umask to 000 dangerous

2023-03-28 02:44| 来源: 网络整理| 查看: 265

sudo umask 0000 will fail because umask isn’t a program. It’s a shell built-in command that affects the current shell session. No sudo is needed or allowed, though sudo commands (and other user switching) don’t inherit the current umask. To set sudo to use a certain umask, another answer gives the solution (I modified it to use 0000 instead):

For the sudo permissions, I executed sudo visudo and added the line Defaults umask = 0000 to the end.

Since the default Ubuntu umask is 0002 (except 0022 for root), setting it to 0000 will merely no longer block an application from giving write permission to everyone other than the file’s owner or group when creating a new file. The application then doesn’t have to give write permission to others when creating a file, but now it can.

It’s not recommended to set this globally for security reasons (perhaps in ~/.bashrc instead), but it’s not likely to cause issues other than bad security when badly-written applications don’t set the permissions properly when creating files.



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有