如何在 Arch Linux 中设置默认 umask

如何在 Arch Linux 中设置默认 umask

如何设置 Arch Linux 的默认 umask。我需要 0022,但我的系统上的默认值是 0027。我检查了一下,etc/profile/它说

umask 0022

但在某个地方设置了另一个 umask 值,我找不到它。有没有建议可以在哪里设置 0027 umask 或者我可以在哪里覆盖它?

答案1

我终于umask 027在文件中找到了该语句~/.profile。对其进行注释并取消注释umask 022即可解决问题。

〜/ .profile

# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.

# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
umask 022
# umask 027

相关内容