zoukankan      html  css  js  c++  java
  • chmod、acl权限

    R:4
    W:2
    X:1

    chmod g+r file 给所有者的组内用户加上读的权限
    chmod o+r file 给其他组用户加上读的权限
    chmod a+x file 给所有用户加上写执行的权限
    chmod 644 file 给所有者改成读写权限,组用户以及其他组用户变成只读权限

    acl

    1.查看文件的facl权限

    getfacl file

    2.给user1增加对file的权限

    setfacl -m u:user1:rwx file

    3.file的所有子目录的权限都继承

    setfacl -m u:user1:rwx - r file

    4.后期新建的文件权限自动继承

    setfacl -m d:u:user1:rwx -r file

    5.撤销user1对file的所有权限

    setfacl -x u:user1 file

    6.清空、重置权限

    setfacl -b file

    sudo
    1.编辑visudo文件,以此添加用户权限

    user1 localhost=/usr/sbin/useradd,/usr/sbin/userdel

    2.使用有密码的sudo授权

    sudo localhost=/usr/sbin/useradd user1

    3.使用无密码的授权

    sudo localhost=NOPASSWD:/usr/sbin/userdel
  • 相关阅读:
    mongodb使用
    chromedriver对应chrome版本
    爬虫-selenium的使用
    爬虫-步骤
    爬虫-lxml用法
    xpath用发
    Chrome插件安装和用法
    正则用法
    五层协议
    git相关流程
  • 原文地址:https://www.cnblogs.com/pandawan/p/10554666.html
Copyright © 2011-2022 走看看