在/etc/profile或~/.profile或~/.bash_profile中設(shè)置umask,umask 022
- 默認(rèn)在創(chuàng)建文件時(shí),權(quán)限是666然后拿掉umask的值 (默認(rèn)不會(huì)給文件執(zhí)行權(quán)限,所以是666)
- 在創(chuàng)建文件夾時(shí),權(quán)限是777然后拿掉umask的值
在/etc/profile或~/.profile或~/.bash_profile中設(shè)置umask,umask 022