Linux default file permission

后端 未结 2 2109
囚心锁ツ
囚心锁ツ 2021-02-20 02:30

Is there someway to set the default file permission in Linux? That is, the file permission for a newly created file (regardless of the context for which it was created ). I know

相关标签:
2条回答
  • 2021-02-20 03:26

    Put the umask in the non-interactive shell startup (.bash_profile, .zshenv, .tcshrc depending on your shell). Then it'll run for non-login sessions.

    0 讨论(0)
  • 2021-02-20 03:27

    If you want to affect the whole system, you can also put it in /etc/profile

    0 讨论(0)
提交回复
热议问题