尧图网络 高端网站定制 · 原创设计
免费咨询热线
400-888-6620
免费获取方案
linux的特殊权限
权限umask默认值为00220022Special bitugo默认权限目录的默认权限是 777 - umask 755文件的默认权限是目录的默认权限去掉执行权限x 1755 - 111 644非特权用户默认的 umask 00220022且在/etc/bashrc中定义~ 目录权限将为 777 - 022 755rwxr-xr-x~ 文件权限将为 777 - 022 - 111 644rw-r–r–root的默认umask 0220022SUIDCommand run with permissions of the owner of the command, not executor of the command.在u位rwx描述sx SUID文件原来有执行权限S- SUID文件原来没有执行权限SGIDCommand runs with group affiliation of the group of the command.Files created in directories with the SGID bit set have group affiliations of the group of the directory.应用于一个目录任何人在该目录里创建的文件及目录会自动属于该目录的组。在g位rwx描述sx SGID文件组成员拥有执行权限S- SGID文件组成员不拥有执行权限Sticky-bitFiles in directories with the sticky-bit set can only be removed by the owner and root, regardless of the write permissions of the directory.在o位rwx描述tx Sticky-bit文件原来有执行权限T- Sticky-bit文件原来没有执行权限特殊权限的总结special permissionsexecutabledirectorySUIDCommand run with permissions of the owner of the command, not executor of the command. Such as: ping.N/ASGIDCommand runs with group affiliation of the group of the command.File created in directories with the SGID bit set have group affiliations of the group of the directory.Sticky-bitN/AFiles in directories with the sticky bit set can only be removed or modified by the owner and root, regardless of the write permission. Such as: /tmp. Often both the Sticky bit and the SGID permission will be set on a project directory.相关命令chmod us exefile chmod 4755 exefile ls -ld /apath chmod gs /apath chmod 2771 /apath ls -ld /apath chmod ot /apath chmod 1777 /apath ls -ld /apath其他SUID只能应用于可执行文件。SGID可应用于可执行文件也可应用于目录。Sticky-bit只能应用于目录。SUID和SGID可同时出现special bits 6。当同时出现时SUID的优先级高于SGID。SUID和Sticky-bit不可能同时出现special bits ≠ 5。ls -l的回显数字[userbee-a admin]$ ll total 36 drwxrwxr-x. 2 user user 59 Jun 20 07:53 bak -rw-rw-r--. 1 user user 644 Jun 16 22:38 get_sys_info.py drwxrwxr-x. 5 user user 41 Jun 16 22:38 __pycache__ -rw-r--r--. 1 user user 3736 Jun 18 13:13 repond.xml -rw-rw-r--. 1 user user 407 Jun 19 22:38 test1.csv -rw-rw-r--. 1 user user 162 Jun 19 21:31 test1.txt -rw-rw-r--. 1 user user 407 Jun 19 22:42 test2.csv -rw-rw-r--. 1 user user 497 Jun 20 12:50 test3.txt -rw-rw-r--. 1 user user 429 Jun 20 12:43 test4.txt -rw-rw-r--. 1 user user 181 Jun 19 22:02 test.csv -rw-rw-r--. 1 user user 1161 Jun 18 13:52 test.xml 第二列的数字 2 表示只有 . 和 .. 两个子目录 5 表示除. 和 .. 两个子目录外还有3个子目录 第一列表示文件类型 - regula file d directory l symbolic link b block special file : U盘磁盘光驱等存储设备 c character special file : 键盘等I/O设备 p named pipe s socket
RELATED

相关推荐

Android 根目录获取文件遍历

Android 根目录获取文件遍历

/*** 通过反射调用获取内置存储和外置sd卡根路径(通用)** param mContext 上下文* param is_removale 是否可移除,false返回内部存储路径,true返回外置SD卡路径* return*/private String getStorage0Path(Context mContext, boolean is_removale) {St…

📅 2026/11/16 17:13:52
Spring Security中RBAC权限模型的设计与实践

Spring Security中RBAC权限模型的设计与实践

1. RBAC模型在Spring Security中的核心价值在权限管理的世界里,RBAC(Role-Based Access Control)就像交通信号灯系统。想象一下,如果每个路口都需要交警单独指挥每辆车的通行,那将是多么低效且容易出错。而RBAC正是通过…

📅 2026/11/17 6:22:36
Runway背景替换精准度提升92%的底层逻辑(Alpha通道校准与光照一致性算法深度拆解)

Runway背景替换精准度提升92%的底层逻辑(Alpha通道校准与光照一致性算法深度拆解)

更多请点击: https://intelliparadigm.com 第一章:Runway背景替换精准度提升92%的技术突破概览 Runway近期发布的Gen-3模型在视频背景替换任务中实现了质的飞跃——基于大规模多模态对齐数据集与自适应掩码优化机制,整体像素级IoU&#xff0…

📅 2026/11/16 18:57:35
MORE NEWS

更多资讯

📰

电工证加plc文案怎么写?全国通用证书助你实操考试一次过

电工证加plc文案怎么写?全国通用证书助你实操考试一次过 实操考试心里没底怕挂科,特别是电工证加plc文案这块内容,很多人总觉得理论考试容易,实操考试才是真正的“拦路虎”。其实不然,只要你了解考试流程、提前准备, 全国通用…

📰

物业可以用建筑电工证值不值得考

物业可以用建筑电工证值不值得考 怕考不过白交培训费,这事儿我太懂了。我带过几十个学员,很多人就是被培训机构套路了,花了几千块,最后证没拿到,钱也打水漂。所以今天我从信阳浉河区应届工程类毕业生的角度,说说【物业可以用建筑电工证】到底值不值得考…

📰

低压电工作业新体库在哪考?学历不高怕报不上名?这几点必须知道

低压电工作业新体库在哪考?学历不高怕报不上名?这几点必须知道 你是不是也觉得学历不高就报不了低压电工作业新体库?其实不然,很多一线电工、技术工人,哪怕是初中毕业,也能顺利通过考试拿到证书。关键是你得知道 在哪考…

📰

大学考的电工证全称2026河南最新政策解读:转岗电工别再踩坑

大学考的电工证全称2026河南最新政策解读:转岗电工别再踩坑 你是不是正在为找工作发愁?手上拿着【大学考的电工证全称】,却找不到合适的工作岗位?2026年河南最新政策一出,许多像你这样的大学生和转岗从业者开始意识到,证书的含金量和报考方式比…

📰

长沙高压电工证考试题报名费多少钱

高压电工证过期了怎么办?内部消息告诉你复审延期的正确方式 证书过期了不知道怎么复审延期,是不是你最近最头疼的事?别急,我这边有 内部消息 ,带你一步步走好高压电工证的复审流程,别再被培训机构忽悠了。…

📰

东莞黄江镇电工证复审别乱报!2026河南最新政策来了

东莞黄江镇电工证复审别乱报!2026河南最新政策来了 你是不是也遇到过这种情况?手头有个电工证,想复审却发现不知道去哪儿报,怕被中间人坑?别急,2026河南最新政策已经落地,东莞黄江镇电工证复审也有明确的渠道和流程。今天就从一个施工企业负责…

TODAY

今日更新

THIS WEEK

本周精选

THIS MONTH

本月热门

读完文章,想聊聊您的网站?

告诉我们您的行业与需求,资深顾问一对一梳理方案与报价,全程免费。

📞 💬