zoukankan      html  css  js  c++  java
  • 后来才知道linux中的0、1、2、4、+、、u、g、o、a、=、r、w、x、d、、l、s、p、c、b非常重要

    平常使用linux没感觉这些东西的重要性, 最多是在网络上稀里糊涂的复制别人的指令, 莫名其妙的运行一下, 其实并不明白原理, 只是知道这是修改权限的, 但当要管理一台服务器划分虚拟主机出租或者赠送朋友使用, 或者多用户涉及隐私设置时, 就发现非要掌握这些知识不可, 要明白其原理——然后就上瘾了, 这个就是求知的魅力。
    真是非常细致的工作。


    什么意思? 在linux中, 我们要设置某个用户或者某一组对某个文件或者目录是否有权限访问, 写入, 执行,就 一定会用到这些符号和符号相关的指令。
    为了学习有目的, 我们先说这些知识的实际应用主要体现在哪方面? 比如, 我有一台服务器, 划分100个虚拟主机给别人用, 那么100个客户就有100个空间, 也就是目录(文件夹)。
    你的客户一般是通过2种方式对自己的空间读、写、执行


    一种是FTP,一种是www-data


    用户既然是通过FTP来管理自己的空间, 那么你就需要把FTP登录的用户名当作主人来看待, 这个FTP用户能访问, 创建, 删除自己空间下的任何内容
    d = directory
    - = regular file
    l = symbolic link
    s = Unix domain socket
    p = named pipe
    c = character device file
    b = block device file
    r = read permission
    w = write permission
    x = execute permission
    - = no permission
    Which user?
    u user/owner
    g group
    o other
    a all
    What to do?
    + add this permission
    - remove this permission
    = set exactly this permission
    Which permissions?
    r read
    w write
    x execute
    4 = read (r)
    2 = write (w)
    1 = execute (x)
    0 = no permission (-)
    Which number?
    0 ---
    1 --x
    2 -w-
    3 -wx
    4 r--
    5 r-x
    6 rw-
    7 rwx

  • 相关阅读:
    Oracle block 格式
    oracle用户解锁
    如何扩大重做日志(redolog)文件的大小
    Oracle重建临时表空间
    ORA-32004: obsolete and/or deprecated parameter(s) specified
    oracle分布式事务总结(转载)
    spring注解 @Scheduled(cron = "0 0 1 * * *")实现定时的执行任务
    IDEA启动Tomcat报错1099 is already in use
    js中const,var,let区别
    mysql笔记
  • 原文地址:https://www.cnblogs.com/computer/p/1781091.html
Copyright © 2011-2022 走看看