技术改变生活

博客园 首页 新随笔 联系 订阅 管理

临时修改umask值,(umask 044;touch a.txt;ll a.txt)

[root@localhost ~]# (umask 044;touch a.txt;ll a.txt)
-rw--w--w- 1 root root 0 Jul 29 00:12 a.txt

()表示在子shell中执行,不影响当前系统环境变量。

 

linux永久修改umask值,编辑/etc/profile

umask=022

保存后,重新加载/etc/profile生效。

source /etc/profile

posted on 2020-06-26 14:55  小阿峰  阅读(1997)  评论(0编辑  收藏  举报