官术网_书友最值得收藏!

Setting umask

We will see how Linux decides the default permissions of the newly created file or folder:

    $ umask
    0002

The meaning of the preceding output is that, if we create a new directory, then, from the permissions of +rwx, the permission 0002 will be subtracted. This means that for a newly created directory, the permissions will be 775, or rwx rwx r-x. For a newly created file, the file permissions will be rw- rw- r--. By default, for any newly created text file, the execute bit will never be set. Therefore, the newly created text file and the directory will have different permissions, even though umask is the same.

主站蜘蛛池模板: 安乡县| 封丘县| 凤庆县| 田林县| 赞皇县| 白水县| 光泽县| 卓尼县| 慈利县| 临夏市| 石景山区| 从化市| 临西县| 沂水县| 定安县| 邮箱| 晋江市| 保靖县| 邢台县| 故城县| 兰坪| 阿拉善右旗| 温宿县| 宜兰县| 襄汾县| 潜山县| 于都县| 周宁县| 辽中县| 宾川县| 牟定县| 孝昌县| 望奎县| 新宾| 观塘区| 贡嘎县| 池州市| 台东市| 南江县| 怀宁县| 达州市|