代码改变世界

facl权限(getfacl/setfacl)

2018-10-03 23:31 by 烟雨楼人, 2896 阅读, 0 推荐, 收藏, 编辑
摘要:file access control list:文件访问控制列表 查看facl: [root@localhost test]# getfacl hei # file: hei # owner: root # group: root user::rwx group::rw- other::rw- 修 阅读全文

umask及文件默认和原始权限说明

2018-10-03 23:11 by 烟雨楼人, 779 阅读, 0 推荐, 收藏, 编辑
摘要:umask作用:设置了用户创建文件的默认权限。是权限的补码,一般在/etc/profile、$ [HOME]/.bash_profile或$[HOME]/.profile中设置umask值。 查看umask值: [root@localhost test]# umask 0022 文件的原始权限是66 阅读全文

linux中suid/sgid/sticky及扩展属性(attr)

2018-10-03 22:38 by 烟雨楼人, 799 阅读, 0 推荐, 收藏, 编辑
摘要:suid只适用于命令文件.(如/usr/bin/passwd) 当命令文件上有suid权限时,则操作用户的权限变成属主权限。命令文件上无suid权限则操作用户的权限不变。 查看suid权限: [root@localhost ha]# which passwd /usr/bin/passwd [roo 阅读全文

linux中ugo权限管理(chmod/chown)

2018-10-03 17:54 by 烟雨楼人, 2307 阅读, 0 推荐, 收藏, 编辑
摘要:查看ugo权限: ll total 12 -rwxr-xr-x 2 root root 4 Oct 3 11:44 a lrwxrwxrwx 1 root root 1 Oct 3 15:57 a.soft -> a drwxr-xr-x 2 root root 6 Oct 3 15:54 b -r 阅读全文

linux组管理(groupadd/groupmod/gpasswd/groupdel)

2018-10-03 17:05 by 烟雨楼人, 363 阅读, 0 推荐, 收藏, 编辑
摘要:配置文件: /etc/gshadow 注:用户组(group)的影子文件; 查看组: cat /etc/group 或者 id -g test root:x:0: bin:x:1: 依次是组名:组密码:gid:附属组成员 [root@localhost test]# id -g test 1003 阅读全文

linux中/etc/passwd和/etc/shadow文件说明

2018-10-03 16:02 by 烟雨楼人, 3022 阅读, 0 推荐, 收藏, 编辑
摘要:/etc/passwd是用来存储登陆用户信息: [root@localhost test]# cat /etc/passwd root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/sbin/nologin linux所有用户的信息都在/etc/pas 阅读全文

linux定时任务(crontab和at)

2018-10-03 11:21 by 烟雨楼人, 672 阅读, 0 推荐, 收藏, 编辑
摘要:查看定时任务:crontab -l [root@localhost test]# crontab -l no crontab for root 创建编辑定时任务:crontab -e [root@localhost test]# crontab -e crontab -e 创建定时任务时会自动打开/ 阅读全文

linux帮助手册(help/man/info)

2018-10-01 23:30 by 烟雨楼人, 478 阅读, 0 推荐, 收藏, 编辑
摘要:linux本身有数据库(数据库名whatis)--man实际是从whatis数据库里查找信息. makewhatis 刚装系统,若man不能用,用makewhatis命令.整理whatis数据库. 当使用man命令时,先在whatis数据库里查找ls相关文档,再用less打开其文档, man手册每章 阅读全文

linux解释器、内建和外建命令

2018-10-01 23:13 by 烟雨楼人, 532 阅读, 0 推荐, 收藏, 编辑
摘要:查看系统是哪种命令解释器: [root@localhost ~]# echo $SHELL /bin/bash 内建命令:是shell程序的一部分,包含的是一些比较简单的linux系统命令,这些命令由shell程序识别并在shell程序内部完成运行。 外建命令:外部命令是在bash之外额外安装的,是 阅读全文

linux文件cat/tac/more/less/head/tail/find/vimdiff

2018-10-01 22:59 by 烟雨楼人, 295 阅读, 0 推荐, 收藏, 编辑
摘要:ls查看目录文件里的文件: [root@localhost test]# ls a aa b c -d选项查看目录文件自身信息: [root@localhost test]# ll -d drwxr-xr-x 3 root root 43 Oct 1 20:20 . a aa b c a aa b 阅读全文