zoukankan      html  css  js  c++  java
  • Linux修改文件权限

    修改文件读写执行权限

    rwx rwx rwx

    分为三段,用户权限 用户组权限 其他人权限

    r-r-r

    添加权限

    chmod +w test.txt     rw-r-r默认在用户权限下添加

    chmod u+w/r/x test.txt   给用户添加权限

    chmod g+w/r/x test.txt   给用户组添加权限

    chmod o+w/r/x test.txt   给其他用户添加权限

     

    chmod u-w/r/x test.txt  给用户减少权限

    chmod g-w/r/x test.txt  给用户组减少权限

    chmod o-w/r/x test.txt  给其他用户减少权限

     

    chmod ug+w,o-w test.txt

     

    chmod a+r test.txt 设为所有人皆可读取

    chmod -R a+r file/ file文件及子文件设为所有人可读

     

    chmod 777 test.txt 给test.txt添加所有权限

    r=4 w=2 x=1

    chmod 666 test.txt 所有用户添加读写权限

    chmod 441 test.txt 用户读 用户组读 其他人执行

  • 相关阅读:
    jQuery Mobile方向感应事件
    Linq-多条件查询
    linux top命令详解
    在Python中调用C++,使用SWIG
    linux下core文件调试方法
    如何设置、查看以及调试core文件
    标准C++中的string类的用法总结(转)
    实用make最佳实践
    GDB多进程调试(转)
    GDB详解
  • 原文地址:https://www.cnblogs.com/EnzoDin/p/8336323.html
Copyright © 2011-2022 走看看