作业一:
1) 新建用户natasha,uid为1000,gid为555,备注信息为“master”
useradd natasha -u 1000 -g 555 -c "master"
2) 修改natasha用户的家目录为/Natasha
usermod -d /Natasha natasha
su - natasha
-bash-4.1$ pwd
/home/Natasha
-bash-4.1$
3) 查看用户信息配置文件的最后一行
tail -1 /etc/passwd
4) 为natasha用户设置密码“123”
echo '123'|passwd --stdin natasha
5) 查看用户密码配置文件的最后一行
tail -1 /etc/shadow
6) 将natasha用户账户锁定
passwd -l natasha
usermod -s /sbin/nologin natasha
7) 将natasha用户账户解锁
passwd -u natasha
usermod -s /bin/bash natasha
8) 新建组police,gid为999
groupadd police -g 999
9) 查看组配置文件的最后一行
tail -1 /etc/group
10) 将natasha用户加入police组
usermod -a -G police natasha
11) 修改police组的组名为jingcha
groupmod -n jingcha police
12) 删除natasha用户,连家目录和邮箱一起删除
userdel natasha -r
13) 删除jingcha组
groupdel jingcha 作业二:
1) 在用户的主目录下创建目录test,进入test创建空文件file1
cd /home/ && mkdir test && touch test/file1
2) 以长格式形式显示文件信息,注意文件的权限和所属用户和组
ls -l test/
[natasha@iZ25j36rr97Z ~]$ ls -l test/
total 0
-rw-rw-r-- 1 natasha natasha 0 May 24 17:00 file1
3) 为文件file1设置权限,使其他用户可以对此文件进行写操作。
chmod o=w test/file1
4) 查看设置结果,
-bash-4.1$ ll test/
-rw-rw--w- 1 natasha natasha 0 May 24 17:14 file1a
5) 取消同组用户对文件file1的读取权限,并查看设置结果。
chmod g-r file1
-rw--w--w- 1 natasha natasha 0 May 24 16:54 file1
6) 用数字表示法为文件file设置权限,所有者可读、可写、可执行,所属组用户和其他用户只具有读和执行的权限。设置完成后查看设置结果。
chmod 755 file1
[natasha@iZ25j36rr97Z ~]$ ll test/file1
-rwxr-xr-x 1 natasha natasha 0 May 24 16:54 test/file1
7) 用数字形式更改文件file1的权限,使所有者只能读取此文件。其他任何用户都没有权限。查看设置结果。
chmod 500 test/
chmod 400 file1
8) 回到上层目录,查看test的权限
cd .. && ll test
dr-x------ 2 natasha natasha 4096 May 24 15:13 test
9) 为其他用户添加对此目录的写权限
chmod o+wx test/ -R 作业三:
以操作文件的方式,新建一个用户alex
echo 'alex:x:1004:1004:master:/home/alex:/bin/bash' >>/etc/passwd
echo 'alex:!!:17310:0:99999:7:::' >> /etc/shadow
echo 'alex:x:666:' >>group
echo 'alex:!::' >> /etc/gshadow
touch /var/spool/mail/alex
uid=1004(alex) gid=1004 groups=1004 作业四:
1) 新建目录/test/dir,属主为tom,数组为group1,/test目录的权限为777
mkdir /test/dir -p && chown tom.group1 /test/dir -R
chmod 777 /test
2) 新建用户jack,切换到jack用户下,验证jack用户对dir目录的rwx权限(开启另外一个终端,依次修改dir目录的others权限)
useradd jack
su - jack 3)将jack加入group1组,验证jack用户对dir目录的rwx权限(开启另外一个终端,依次修改dir目录的group权限)
usermod -a -G group1 jack [root@iZ25j36rr97Z test]# chmod g=- dir/
[root@iZ25j36rr97Z test]# ll
total 4
drwx---r-x 2 tom group1 4096 May 25 19:22 dir
[jack@iZ25j36rr97Z test]$ ls dir
ls: cannot open directory dir: Permission denied
[jack@iZ25j36rr97Z test]$ touch dir/1
touch: cannot touch `dir/1': Permission denied
[jack@iZ25j36rr97Z test]$ cd dir
-bash: cd: dir: Permission denied
[jack@iZ25j36rr97Z test]$ [root@iZ25j36rr97Z test]# chmod g=r dir
[root@iZ25j36rr97Z test]# ll
total 4
drwxr--r-x 2 tom group1 4096 May 25 19:22 dir
[root@iZ25j36rr97Z test]#
[jack@iZ25j36rr97Z test]$ ls dir
[jack@iZ25j36rr97Z test]$ touch dir/1
touch: cannot touch `dir/1': Permission denied
[jack@iZ25j36rr97Z test]$ cd dir
-bash: cd: dir: Permission denied
[jack@iZ25j36rr97Z test]$ [root@iZ25j36rr97Z test]# chmod g=w dir
[root@iZ25j36rr97Z test]# ll
total 4
drwx-w-r-x 2 tom group1 4096 May 25 19:22 dir
[root@iZ25j36rr97Z test]#
[jack@iZ25j36rr97Z test]$ ls dir
ls: cannot open directory dir: Permission denied
[jack@iZ25j36rr97Z test]$ touch dir/1
touch: cannot touch `dir/1': Permission denied
[jack@iZ25j36rr97Z test]$ cd dir
-bash: cd: dir: Permission denied
[jack@iZ25j36rr97Z test]$ [root@iZ25j36rr97Z test]# chmod g=x dir
[root@iZ25j36rr97Z test]# ll
total 4
drwx--xr-x 2 tom group1 4096 May 25 19:22 dir
[root@iZ25j36rr97Z test]#
[jack@iZ25j36rr97Z test]$ ls dir
ls: cannot open directory dir: Permission denied
[jack@iZ25j36rr97Z test]$ touch dir/1
touch: cannot touch `dir/1': Permission denied
[jack@iZ25j36rr97Z test]$ cd dir
[jack@iZ25j36rr97Z dir]$ [root@iZ25j36rr97Z test]# chmod g=rw dir
[root@iZ25j36rr97Z test]# ll
total 4
drwxrw-r-x 2 tom group1 4096 May 25 19:22 dir
[root@iZ25j36rr97Z test]#
[jack@iZ25j36rr97Z test]$ ls dir
[jack@iZ25j36rr97Z test]$ touch dir/1
touch: cannot touch `dir/1': Permission denied
[jack@iZ25j36rr97Z test]$ cd dir
-bash: cd: dir: Permission denied
[jack@iZ25j36rr97Z test]$ [root@iZ25j36rr97Z test]# chmod g=rx dir
[root@iZ25j36rr97Z test]# ll
total 4
drwxr-xr-x 2 tom group1 4096 May 25 19:22 dir
[root@iZ25j36rr97Z test]#
[jack@iZ25j36rr97Z test]$ ls dir
[jack@iZ25j36rr97Z test]$ touch dir/1
touch: cannot touch `dir/1': Permission denied
[jack@iZ25j36rr97Z test]$ cd dir
[jack@iZ25j36rr97Z dir]$ [root@iZ25j36rr97Z test]# chmod g=wx dir
[root@iZ25j36rr97Z test]# ll
total 4
drwx-wxr-x 2 tom group1 4096 May 25 19:22 dir
[root@iZ25j36rr97Z test]#
[jack@iZ25j36rr97Z test]$ ls dir
ls: cannot open directory dir: Permission denied
[jack@iZ25j36rr97Z test]$ touch dir/1
[jack@iZ25j36rr97Z test]$ cd dir
[jack@iZ25j36rr97Z dir]$ 4)切换到tom用户,验证tom用户对dir目录的rwx权限(开启另外一个终端,依次修改dir目录的user权限)
[root@iZ25j36rr97Z test]# chmod u=- dir
[root@iZ25j36rr97Z test]# ll
total 4
d----wxr-x 2 tom group1 4096 May 25 19:40 dir
[root@iZ25j36rr97Z test]#
[tom@iZ25j36rr97Z test]$ ll
total 4
drwx-wxr-x 2 tom group1 4096 May 25 19:40 dir
[tom@iZ25j36rr97Z test]$ ls dir
ls: cannot open directory dir: Permission denied
[tom@iZ25j36rr97Z test]$ touch dir/1
touch: cannot touch `dir/1': Permission denied
[tom@iZ25j36rr97Z test]$ cd dir
-bash: cd: dir: Permission denied
[tom@iZ25j36rr97Z test]$ [root@iZ25j36rr97Z test]# chmod u=r dir
[root@iZ25j36rr97Z test]# ll
total 4
dr---wxr-x 2 tom group1 4096 May 25 19:40 dir
[root@iZ25j36rr97Z test]# [tom@iZ25j36rr97Z test]$ ls dir
ls: cannot access dir/1: Permission denied
1
[tom@iZ25j36rr97Z test]$ touch dir/2
touch: cannot touch `dir/2': Permission denied
[tom@iZ25j36rr97Z test]$ cd dir
-bash: cd: dir: Permission denied
[tom@iZ25j36rr97Z test]$ [root@iZ25j36rr97Z test]# chmod u=w dir
[root@iZ25j36rr97Z test]# ll
total 4
d-w--wxr-x 2 tom group1 4096 May 25 19:40 dir
[root@iZ25j36rr97Z test]#
[tom@iZ25j36rr97Z test]$ touch dir/2
touch: cannot touch `dir/2': Permission denied
[tom@iZ25j36rr97Z test]$ cd dir
-bash: cd: dir: Permission denied
[tom@iZ25j36rr97Z test]$ ll
total 4
d-w--wxr-x 2 tom group1 4096 May 25 19:40 dir
[tom@iZ25j36rr97Z test]$ [root@iZ25j36rr97Z test]# chmod u=x dir
[root@iZ25j36rr97Z test]# ll
total 4
d--x-wxr-x 2 tom group1 4096 May 25 19:40 dir
[root@iZ25j36rr97Z test]#
[tom@iZ25j36rr97Z test]$ ls dir
ls: cannot open directory dir: Permission denied
[tom@iZ25j36rr97Z test]$ touch dir/1
touch: cannot touch `dir/1': Permission denied
[tom@iZ25j36rr97Z test]$ cd dir
[tom@iZ25j36rr97Z dir]$ [root@iZ25j36rr97Z test]# chmod u=rw dir
[root@iZ25j36rr97Z test]# ll
total 4
drw--wxr-x 2 tom group1 4096 May 25 19:40 dir
[root@iZ25j36rr97Z test]#
[tom@iZ25j36rr97Z test]$ ls dir
ls: cannot access dir/1: Permission denied
1
[tom@iZ25j36rr97Z test]$ touch dir/3
touch: cannot touch `dir/3': Permission denied
[tom@iZ25j36rr97Z test]$ cd dir
-bash: cd: dir: Permission denied
[tom@iZ25j36rr97Z test]$ ll
total 4
drw--wxr-x 2 tom group1 4096 May 25 19:40 dir
[tom@iZ25j36rr97Z test]$ [root@iZ25j36rr97Z test]# chmod u=rx dir
[root@iZ25j36rr97Z test]# ll
total 4
dr-x-wxr-x 2 tom group1 4096 May 25 19:40 dir
[tom@iZ25j36rr97Z test]$ ll
total 4
dr-x-wxr-x 2 tom group1 4096 May 25 19:40 dir
[tom@iZ25j36rr97Z test]$ ls dir
1
[tom@iZ25j36rr97Z test]$ touch dir/3
touch: cannot touch `dir/3': Permission denied
[tom@iZ25j36rr97Z test]$ cd dir
[tom@iZ25j36rr97Z dir]$
[root@iZ25j36rr97Z test]# chmod u=xw dir
[root@iZ25j36rr97Z test]# ll
total 4
d-wx-wxr-x 2 tom group1 4096 May 25 19:49 dir
[root@iZ25j36rr97Z test]#
[tom@iZ25j36rr97Z test]$ ls dir
ls: cannot open directory dir: Permission denied
[tom@iZ25j36rr97Z test]$ touch dir/3
[tom@iZ25j36rr97Z test]$ cd dir
[tom@iZ25j36rr97Z dir]$ 5)在dir目录内新建文件tom.txt,属主为tom,属组为group1,/test目录的权限为777
chown tom.group1 tom.txt
chmod 777 /test
6)新建用户rose,切换到rose用户下,验证rose用户对tom.txt的rwx权限(开启另外一个终端,依次修改tom.txt的others权限来配合验证过程)
[rose@iZ25j36rr97Z test]$ ll dir
total 0
-rw-r--r-- 1 tom group1 0 May 24 17:58 tom.txt
[rose@iZ25j36rr97Z test]$ echo '1' >dir/tom.txt
-bash: dir/tom.txt: Permission denied
[rose@iZ25j36rr97Z dir]$ cat tom.txt
[rose@iZ25j36rr97Z dir]$ sh tom.txt
5 [root@iZ25j36rr97Z dir]# chmod o=- tom.txt
[rose@iZ25j36rr97Z dir]$ ll
total 0
-rw-r----- 1 tom group1 0 May 24 17:58 tom.txt
[rose@iZ25j36rr97Z dir]$ cat tom.txt
cat: tom.txt: Permission denied
[rose@iZ25j36rr97Z dir]$ echo '11' >tom.txt
-bash: tom.txt: Permission denied
[rose@iZ25j36rr97Z dir]$ sh tom.txt
sh: tom.txt: Permission denied
[rose@iZ25j36rr97Z dir]$ [root@iZ25j36rr97Z dir]# chmod o=w tom.txt
[rose@iZ25j36rr97Z dir]$ ll tom.txt
-rw-r---w- 1 tom group1 3 May 24 18:02 tom.txt
[rose@iZ25j36rr97Z dir]$ echo '11' >tom.txt
[rose@iZ25j36rr97Z dir]$ sh tom.txt
sh: tom.txt: Permission denied
[rose@iZ25j36rr97Z dir]$ cat tom.txt
cat: tom.txt: Permission denied
[rose@iZ25j36rr97Z dir]$ [root@iZ25j36rr97Z dir]# chmod o=x tom.txt
[rose@iZ25j36rr97Z dir]$ ll
total 4
-rw-r----x 1 tom group1 3 May 24 18:02 tom.txt
[rose@iZ25j36rr97Z dir]$ echo '11' >tom.txt
-bash: tom.txt: Permission denied
[rose@iZ25j36rr97Z dir]$ cat tom.txt
cat: tom.txt: Permission denied
[rose@iZ25j36rr97Z dir]$ sh tom.txt
sh: tom.txt: Permission denied
[rose@iZ25j36rr97Z dir]$ [root@iZ25j36rr97Z dir]# chmod o=rw tom.txt
[root@iZ25j36rr97Z dir]# ll
total 4
-rw-r--rw- 1 tom group1 3 May 24 18:02 tom.txt
[rose@iZ25j36rr97Z dir]$ echo '3' >tom.txt
[rose@iZ25j36rr97Z dir]$ cat tom.txt
echo '3'
[rose@iZ25j36rr97Z dir]$ sh tom.txt
3 [root@iZ25j36rr97Z dir]# chmod o=rx tom.txt
[rose@iZ25j36rr97Z dir]$ ll
total 4
-rw-r--r-x 1 tom group1 31 May 24 18:35 tom.txt
[rose@iZ25j36rr97Z dir]$./tom.txt
3
'3'
'3'
[rose@iZ25j36rr97Z dir]$ cat tom.txt
echo '3'
echo \'3\'
echo \'3\'
[rose@iZ25j36rr97Z dir]$ echo "echo \'4\'" >>tom.txt
-bash: tom.txt: Permission denied [root@iZ25j36rr97Z dir]# chmod o=wx tom.txt
[rose@iZ25j36rr97Z dir]$ ll
total 4
-rw-r---wx 1 tom group1 20 May 24 18:33 tom.txt
[rose@iZ25j36rr97Z dir]$ echo "echo \'3\'" >>tom.txt
[rose@iZ25j36rr97Z dir]$ ./tom.txt
bash: ./tom.txt: Permission denied
[rose@iZ25j36rr97Z dir]$ cat tom.txt
cat: tom.txt: Permission denied [root@iZ25j36rr97Z dir]# chmod o=rwx tom.txt
[rose@iZ25j36rr97Z dir]$ ll
total 4
-rw-r---wx 1 tom group1 20 May 24 18:33 tom.txt
[rose@iZ25j36rr97Z dir]$ cat tom.txt
cat: tom.txt: Permission denied
[rose@iZ25j36rr97Z dir]$ cat tom.txt
echo '3'
echo \'3\'
[rose@iZ25j36rr97Z dir]$ ./tom.txt
3
'3'
[rose@iZ25j36rr97Z dir]$ echo "echo \'3\'" >>tom.txt 7)将rose加入group1组,在rose用户下,验证rose用户对tom.txt的rwx权限(开启另外一个终端,依次修改tom.txt的group1权限来配合验证过程)
usermod -a -G group1 rose
[rose@iZ25j36rr97Z dir]$ ll
total 0
-rw-r--r-- 1 tom group1 0 May 24 18:48 tom.txt
[rose@iZ25j36rr97Z dir]$ echo '1' >tom.txt
-bash: tom.txt: Permission denied
[rose@iZ25j36rr97Z dir]$ cat tom.txt
[rose@iZ25j36rr97Z dir]$ ./tom.txt
-bash: ./tom.txt: Permission denied [root@iZ25j36rr97Z dir]# chmod g=- tom.txt
[rose@iZ25j36rr97Z dir]$ cat tom.txt
cat: tom.txt: Permission denied
[rose@iZ25j36rr97Z dir]$ echo '1' >tom.txt
-bash: tom.txt: Permission denied
[rose@iZ25j36rr97Z dir]$ ./tom.txt
-bash: ./tom.txt: Permission denied
[rose@iZ25j36rr97Z dir]$ ll tom.txt
-rw----r-- 1 tom group1 0 May 24 18:48 tom.txt
[rose@iZ25j36rr97Z dir]$ [root@iZ25j36rr97Z dir]# chmod g=r tom.txt
[rose@iZ25j36rr97Z dir]$ ll tom.txt
-rw-r--r-- 1 tom group1 0 May 24 18:48 tom.txt
[rose@iZ25j36rr97Z dir]$ cat tom.txt
[rose@iZ25j36rr97Z dir]$ echo '1' >tom.txt
-bash: tom.txt: Permission denied
[rose@iZ25j36rr97Z dir]$ ./tom.txt
-bash: ./tom.txt: Permission denied
[rose@iZ25j36rr97Z dir]$ [root@iZ25j36rr97Z dir]# chmod g=w tom.txt
[rose@iZ25j36rr97Z dir]$ ll tom.txt
-rw--w-r-- 1 tom group1 0 May 24 18:48 tom.txt
[rose@iZ25j36rr97Z dir]$ cat tom.txt
cat: tom.txt: Permission denied
[rose@iZ25j36rr97Z dir]$ echo '1' >tom.txt [root@iZ25j36rr97Z dir]# chmod g=x tom.txt
[rose@iZ25j36rr97Z dir]$ ll tom.txt
-rw---xr-- 1 tom group1 2 May 24 18:52 tom.txt
[rose@iZ25j36rr97Z dir]$ cat tom.txt
cat: tom.txt: Permission denied
[rose@iZ25j36rr97Z dir]$ echo '1' >tom.txt
-bash: tom.txt: Permission denied
[rose@iZ25j36rr97Z dir]$./tom.txt
bash: ./tom.txt: Permission denied
[rose@iZ25j36rr97Z dir]$ [root@iZ25j36rr97Z dir]# chmod g=rw tom.txt
[root@iZ25j36rr97Z dir]# ll
total 4
-rw-rw-r-- 1 tom group1 2 May 24 18:52 tom.txt
[root@iZ25j36rr97Z dir]#
[rose@iZ25j36rr97Z dir]$ cat tom.txt
1
[rose@iZ25j36rr97Z dir]$ echo '1' >tom.txt
[rose@iZ25j36rr97Z dir]$ ./tom.txt
-bash: ./tom.txt: Permission denied [root@iZ25j36rr97Z dir]# chmod g=rx tom.txt
[root@iZ25j36rr97Z dir]# ll
total 4
-rw-r-xr-- 1 tom group1 2 May 24 18:59 tom.txt
[rose@iZ25j36rr97Z dir]$ cat tom.txt
echo '2'
[rose@iZ25j36rr97Z dir]$ echo 'ls ' >tom.txt
-bash: tom.txt: Permission denied
[rose@iZ25j36rr97Z dir]$ ./tom.txt
2 [root@iZ25j36rr97Z dir]# chmod g=wx tom.txt
[root@iZ25j36rr97Z dir]# ll
total 4
-rw--wxr-- 1 tom group1 9 May 24 19:02 tom.txt
[rose@iZ25j36rr97Z dir]$ cat tom.txt
cat: tom.txt: Permission denied
[rose@iZ25j36rr97Z dir]$ ./tom.txt
bash: ./tom.txt: Permission denied
[rose@iZ25j36rr97Z dir]$ echo '1' >tom.txt [root@iZ25j36rr97Z dir]# chmod g=rwx tom.txt
[root@iZ25j36rr97Z dir]# ll tom.txt
-rw-rwxr-- 1 tom group1 13 May 24 19:07 tom.txt
[root@iZ25j36rr97Z dir]# [rose@iZ25j36rr97Z dir]$ ./tom.txt
222
[rose@iZ25j36rr97Z dir]$ cat tom.txt
echo '222'
[rose@iZ25j36rr97Z dir]$ echo '1' >>tom.txt 8)切换到tom用户,验证tom用户对tom.txt的rwx权限(开启另外一个终端,依次修改tom.txt的user权限来配合验证过程) [root@iZ25j36rr97Z dir]# chmod u=- tom.txt
[tom@iZ25j36rr97Z dir]$ ll
total 0
----rw-r-- 1 tom group1 0 May 24 19:14 tom.txt
[tom@iZ25j36rr97Z dir]$ cat tom.txt
cat: tom.txt: Permission denied
[tom@iZ25j36rr97Z dir]$ ./tom.txt
-bash: ./tom.txt: Permission denied
[tom@iZ25j36rr97Z dir]$ echo '11' >tom.txt
-bash: tom.txt: Permission denied
[tom@iZ25j36rr97Z dir]$ [root@iZ25j36rr97Z dir]# chmod u=r tom.txt
[tom@iZ25j36rr97Z dir]$ cat tom.txt
[tom@iZ25j36rr97Z dir]$ ./tom.txt
-bash: ./tom.txt: Permission denied
[tom@iZ25j36rr97Z dir]$ echo '1' > tom.txt
-bash: tom.txt: Permission denied [root@iZ25j36rr97Z dir]# chmod u=w tom.txt
[root@iZ25j36rr97Z dir]# ll
total 0
--w-rw-r-- 1 tom group1 0 May 24 19:14 tom.txt
[tom@iZ25j36rr97Z dir]$ cat tom.txt
cat: tom.txt: Permission denied
[tom@iZ25j36rr97Z dir]$ echo '1' > tom.txt
[tom@iZ25j36rr97Z dir]$ ./tom.txt
-bash: ./tom.txt: Permission denied [root@iZ25j36rr97Z dir]# ll
total 4
---xrw-r-- 1 tom group1 2 May 24 19:18 tom.txt
[tom@iZ25j36rr97Z dir]$ cat tom.txt
cat: tom.txt: Permission denied
[tom@iZ25j36rr97Z dir]$ ./tom.txt
bash: ./tom.txt: Permission denied
[tom@iZ25j36rr97Z dir]$ echo '1' > tom.txt
-bash: tom.txt: Permission denied [root@iZ25j36rr97Z dir]# chmod u=rw tom.txt
[root@iZ25j36rr97Z dir]# ll
total 0
-rw-rw-r-- 1 tom group1 0 May 24 19:21 tom.txt
[root@iZ25j36rr97Z dir]#
[tom@iZ25j36rr97Z dir]$ cat tom.txt
[tom@iZ25j36rr97Z dir]$ ./tom.txt
-bash: ./tom.txt: Permission denied
[tom@iZ25j36rr97Z dir]$ echo '1' > tom.txt [root@iZ25j36rr97Z dir]# chmod u=rx tom.txt
[root@iZ25j36rr97Z dir]# ll
total 4
-r-xrw-r-- 1 tom group1 2 May 24 19:23 tom.txt
[root@iZ25j36rr97Z dir]#
[tom@iZ25j36rr97Z dir]$ cat tom.txt
echo '1'
[tom@iZ25j36rr97Z dir]$ ./tom.txt
1
[tom@iZ25j36rr97Z dir]$ echo '1' >> tom.txt
-bash: tom.txt: Permission denied [root@iZ25j36rr97Z dir]# chmod u=wx tom.txt
[root@iZ25j36rr97Z dir]# ll
total 4
--wxrw-r-- 1 tom group1 11 May 24 19:35 tom.txt [tom@iZ25j36rr97Z dir]$ cat tom.txt
cat: tom.txt: Permission denied
[tom@iZ25j36rr97Z dir]$ ./tom.txt
bash: ./tom.txt: Permission denied
[tom@iZ25j36rr97Z dir]$ echo '1' >> tom.txt
[tom@iZ25j36rr97Z dir]$
  

  

linux 权限 homework的更多相关文章

  1. linux权限系统

    Linux权限分为 r(4):可读 , w(2)可写 , x(1)可执行 , -无权限 , 可以通过ls -l 文件名查看权限 , 如 ls -l 文件名 输出: -rwxrw---x. root r ...

  2. Shell基础:Linux权限管理

    Linux权限基本概念 查看系统(文件夹/文件)权限: ls -l =>d/-   xxx xxx xxx.  num  owner  group  size   date  filename ...

  3. 关于LINUX权限-bash: ./startup.sh: Permission denied

    关于LINUX权限-bash: ./startup.sh: Permission denied <script type="text/javascript"></ ...

  4. Linux权限操作 [转]

    Linux权限操作 本文内容来自<鸟哥linux私房菜>读后个人做的笔记,该书实为学习linux的很好入门教材 一.文件属性 ls ls -al列出所有的档案属性 ls是List的意思 档 ...

  5. linux权限解读

    1 只读权限,用r表示(read):可以读取文件或者列出目录的内容 2 可写权限,用w表示(write):可以删除文件或目录 3 可执行权限,用x表示(execute):可以执行可执行文件:可以进入目 ...

  6. linux权限---【600,644,700,755,711,666,777】 - - 博客频道 - CSDN.NET

    body { font-family: "Microsoft YaHei UI","Microsoft YaHei",SimSun,"Segoe UI ...

  7. Linux系列教程(十六)——Linux权限管理之ACL权限

    通过前面的两篇博客我们介绍了Linux系统的用户管理,Linux用户和用户组管理之相关配置文件 讲解了用户管理的相关配置文件,包括用户信息文件/etc/passwd,用户密码文件/etc/shadow ...

  8. Linux权限分析

    我看过网上的一些有关Linux的权限分析,有些说的不够清楚,另外一些说的又太复杂.这里我尽量简单.清楚的把Linux权限问题阐述明白,Linux权限没有那么复杂. Linux权限问题要区分文件权限和目 ...

  9. 【Linux】 Linux权限管理与特殊权限

    Linux权限管理 权限管理这方面,非常清楚地记得刚开始实习那会儿是仔细研究过的,不知道为什么没有笔记留痕..除了一些基本的知识点早就忘光了,无奈只好从头开始学习一遍.. ■ 基本权限知识 这部分实在 ...

随机推荐

  1. scapy学习笔记(2)

    一.包 包(Packet)是TCP/IP协议通信传输中的数据单位,一般也称“数据包”.其主要由“目的IP地址”.“源IP地址”.“净载数据”等部分构成,包括包头和包体,包头是固定长度,包体的长度不定, ...

  2. BZOJ4197 / UOJ129 [Noi2015]寿司晚宴

    本文版权归ljh2000和博客园共有,欢迎转载,但须保留此声明,并给出原文链接,谢谢合作. 本文作者:ljh2000 作者博客:http://www.cnblogs.com/ljh2000-jump/ ...

  3. 更改jmeter发送邮件样式(转)

    http://www.cnblogs.com/puresoul/p/5049433.html Jmeter默认的报告展示的信息比较少,如果出错了,不是很方便定位问题.由Jmeter默认报告优化这篇文章 ...

  4. img标签显示本地文件

    html: <img src="__IMG__/male.png" id="imgfpic1" style="height: 100%; wid ...

  5. ICollectionView

    引自:http://www.cnblogs.com/Joetao/articles/2168577.html ICollectionView让MVVM更简单   (一)ICollectionView的 ...

  6. EF4 Model 代码生成EFPowerTools,Vs2015不支持,自己封装一个

    Vs2013上面有个插件EFPowerTools,用来生产entity实体代码的.目前官方只支持到Vs2013,虽然经过网上网友的方法,修改支持版本号,可以在Vs2015上安装.安装后连接远程数据库还 ...

  7. hzau 1203 One Stroke

    1203: One Stroke Time Limit: 2 Sec  Memory Limit: 1280 MBSubmit: 264  Solved: 56[Submit][Status][Web ...

  8. 计算机网络【七】:可靠传输的实现 (tcp窗口滑动以及拥塞控制)【转】

    转自:http://blog.chinaunix.net/uid-26275986-id-4109679.html TCP协议作为一个可靠的面向流的传输协议,其可靠性和流量控制由滑动窗口协议保证,而拥 ...

  9. 通过Intent 打开系统级应用

    众所周知,各个手机厂商由于对Android 原生系统定制的原因,会造成系统级应用packname 和activityname 不同的现象,就拿时钟软件来说,魅族2的activityname 是[com ...

  10. js比较函数

    //1.//bySort函数接受一个首要比较字符串和一个可选的次要比较函数做为参数//并返回一个可以用来包含该成员的对象数组进行排序的比较函数//当o[firstName] 和 p[firstName ...