临时修改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

相关文章:

  • 2021-10-17
  • 2021-09-28
  • 2022-12-23
  • 2021-11-14
  • 2022-12-23
  • 2021-12-01
  • 2022-02-02
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-09
  • 2021-09-20
  • 2022-12-23
  • 2022-02-16
  • 2021-11-14
  • 2021-12-06
相关资源
相似解决方案