umask 모드를 변경할 수 없습니다

umask 모드를 변경할 수 없습니다

나는 변화하려고 노력하고있다마스크모드 사용법로그인 이름.defsconfig 파일이지만 어떤 이유로 시스템에 영향을 미치지 않습니다.

이것이 내가 한 일입니다:sudo nano /etc/login.defs

# The ERASECHAR and KILLCHAR are used only on System V machines.
# The ULIMIT is used only if the system supports it.
# (now it works with setrlimit too; ulimit is in 512-byte units)
#
# Prefix these values with "0" to get octal, "0x" to get hexadecimal.
#
ERASECHAR       0177
KILLCHAR        025
UMASK           027

변화하려고 노력하면 UMASK 027변화 UMASK 007됩니다.

다음:

# Enable setting of the umask group bits to be the same as owner bits
# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is
# the same as gid, and username is the same as the primary group name.
#
# This also enables userdel to remove user groups if no members exist.
#
USERGROUPS_ENAB yes

변경 후 파일을 USERGROUPS_ENAB yes저장 USERGROUPS_ENAB no하고 로그아웃했다가 로그인하여 생성을 시도합니다.문서예를 들어:

touch file ~/

그리고 출력문서

stat -c %a ~/file

주어진644화그리고 예상치 못한640. 얼마 전에 이 솔루션을 수행했는데 정말 잘 작동했던 것으로 기억합니다.

다른 해결책이나 설명이 있습니까?

이 내 꺼야핵심정보:

Linux 4.13.8-1-ARCH #1 SMP PREEMPT Wed Oct 18 12:11:48 CEST 2017 i686 GNU/Linux

답변1

나를 도와주려고 노력한 의견에 감사드립니다. 그래서 우연히 파일을 umask 027변경하여 ~/bashrc패턴을 영구적으로 만들었습니다 . 실제로 해당 파일에는 컬렉션이 없으므로 umask텍스트 끝에 다음 줄을 추가했습니다.

#umask mode
umask 027

그리고 시스템 이후로그아웃그리고로그인시스템 전체에서 이 규칙을 무시하는 것으로 보이며 이제 새로 생성된 파일에는 권한이 있습니다.640

관련 정보