zoukankan      html  css  js  c++  java
  • Linux 基础与应用教程 003(权限管理命令简单基础)

    1.chmod  (权限管理)[root@bogon tem]# chmod -R 777 /tem/a/b    递归改变权限;

    权限数字法     所有者,root才能更改权限;

    r ----4  

    w ---2

    x ---1

    2.chown  改变文件或者所有者;

    [root@bogon tem]# touch fengjie
    [root@bogon tem]# ls -l fengjie
    -rw-r--r--. 1 root root 0 4月 12 11:42 fengjie
    [root@bogon tem]# useradd shenchao
    [root@bogon tem]#
    [root@bogon tem]# chown shenchao fengjie
    [root@bogon tem]# ls -l fengjie
    -rw-r--r--. 1 shenchao root 0 4月 12 11:42 fengjie

    3.chgrp(改变文件所属组)

    [root@bogon tem]# groupadd lampbrother
    [root@bogon tem]# chgrp lampbrother fengjie
    [root@bogon tem]# ls -l fengjie
    -rw-r--r--. 1 shenchao lampbrother 0 4月 12 11:42 fengjie
    [root@bogon tem]#

    [root@bogon tem]# chmod g+w fengjie
    [root@bogon tem]# ls -l fengjie
    -rw-rw-r--. 1 shenchao lampbrother 0 4月 12 11:42 fengjie

    4.umask -S   显示,设置文件的缺省权限;

    [root@bogon tem]# mkdir test1
    [root@bogon tem]# ls -l test1
    总用量 0
    [root@bogon tem]# ls -ld test1
    drwxr-xr--. 2 root root 6 4月 12 11:58 test1
    [root@bogon tem]#(改变成统一的想要的权限)

    This moment will nap, you will have a dream; but this moment study, you will interpret a dream.
  • 相关阅读:
    PS3 可播放的多媒体类型
    VB个性化文件夹图标
    Delphi源码:编辑长求字符串相似度
    Delphi使用zlib来压缩文件
    汉字编码问题
    Silverlight 3 学习概要
    asp.net下大文件上传知识整理
    DHTML动态创建一个弹出遮罩层
    Delphi的运算符重载
    Windows Vista 交互式服务编程
  • 原文地址:https://www.cnblogs.com/mawenqi-barry/p/8806936.html
Copyright © 2011-2022 走看看