成吉思汗和忽必烈是什么关系| 感冒咳嗽吃什么食物好| 雨污分流什么意思| 13岁属什么| 白芨主治什么病| 大泽土是什么生肖| 韭菜吃多了有什么坏处| 麟是什么意思| 什么是化学| 嗓子疼吃什么食物好| 什么的智慧| 性瘾是什么意思| 麻风病是什么| 无伤大雅是什么意思| 什么人入什么| 螨虫用什么药可以杀死它| 乳蛾是什么意思| 西瓜像什么比喻句| 生孩子大出血是什么原因造成的| 手指发麻是什么原因| 手抖是什么病的前兆| 七月三十是什么星座| 小囡是什么意思| 雾化对小孩有什么影响或者副作用| 癫痫是什么症状| 进门见什么好| 后背一推就出痧是什么原因| 蓬头垢面是什么意思| 土耳其是什么人种| 无花果什么季节吃| fila是什么牌子| 血压正常头晕是什么原因| 打玻尿酸有什么副作用吗| 脸上长藓用什么药| 五经指什么| 你为什么不说话歌词| 走资派是什么意思| 妹妹你坐船头是什么歌| 警察两杠三星是什么级别| 1993属什么| 小月子是什么意思| 什么人容易得布病| 喝酒不能吃什么药| 大腿后侧疼痛什么原因| 50年属什么| 胃酸烧心吃什么药| 地主是什么意思| 肾结石吃什么比较好| 什么鱼红烧最好吃| 看腋下挂什么科| 蓝光有什么作用| 割掉胆对人有什么影响| h家是什么牌子| 什么是翘舌音| 先天性巨结肠有什么症状| 猪肚和什么煲汤最好| 心脏疼吃什么药效果好| 420是什么意思| 胃气胀是什么原因怎么解决| 体检要带什么| 脑供血不足食补吃什么| 死马当活马医是什么意思| 左下腹痛是什么原因| 16岁是什么年华| 给男朋友买什么礼物比较好| 营养神经吃什么药效果好| 六八年属什么生肖| 经期吃凉的东西有什么影响| tf口红是什么牌子| 真性情是什么意思| 4岁打什么疫苗| 一什么雨伞| 1951年属什么生肖| 茶色是什么颜色| 医美是什么| 竹心泡水喝有什么功效| 你在做什么| 医院三甲是什么意思| 金花是什么意思| 幼儿睡觉出汗多是什么原因| 什么是石女| 卡其色裙子配什么颜色上衣好看| 点石成金是什么意思| 什么水果对胃好| 冰箱什么牌子的好| 宥怎么读什么意思| 大舅哥是什么意思| 什么使我快乐| 飞行模式是什么意思| 走马灯什么意思| 午餐肉是什么肉做的| 豆包什么意思| 八月份是什么星座| 红斑狼疮是一种什么病| 与什么俱什么| 久视伤血是什么意思| bv是什么牌子| 董监高是什么意思| 粉尘螨是什么东西| 老打瞌睡犯困是什么原因| 血糖高什么原因| 11.9是什么星座| 什么是幂| pe和pb是什么意思| 脚膜炎用什么药最好| 抗衰老吃什么| 什么药可以延长性功能| 多囊是什么病| 小孩血压低是什么原因| bdsm什么意思| 樊胜美是什么电视剧| 桑葚搭配什么泡水喝最好| 天公作美是什么生肖| 什么时候是情人节| adh医学上是什么意思| 假牙什么材质的最好| 男士皮带什么品牌好| 师夷长技以制夷什么意思| kobe是什么意思| 右肾小结石是什么意思| 眼睛睁不开是什么原因| egm是什么意思| 什么的摇篮| 身上为什么老是痒| 孩子喉咙痛吃什么药好| 开屏是什么意思| pco2是什么意思| 什么猫| 顺丰为什么这么快| 孕期血糖高可以吃什么水果| 姐姐的女儿叫什么称呼| 包的部首是什么| 早上8点到9点是什么时辰| 左肝钙化灶是什么意思| 野餐带什么| 铜陵有什么好玩的地方| 为什么月经一次比一次提前| 今天忌什么宜什么| 糖尿病吃什么水果| 刮宫是什么意思| 今年什么时候进伏天| 喝酒后腰疼是什么原因| 海胆是什么| 钧字五行属什么| 手指上的斗和簸箕代表什么意思| 肚子有虫吃什么药| 阴阳失调吃什么中成药| 为什么会长老年斑| rt是什么单位| 落枕吃什么药| 斗拱是什么意思| av是什么意思| 做俯卧撑有什么好处| pck是什么意思| 洗牙喷砂是什么意思| 女人湿气重吃什么药效果好| 后羿射日是什么意思| 梦遗太频繁是什么原因造成的| 眼睛飞蚊症用什么眼药水| 猕猴桃什么时候吃最好| 除权是什么意思| 看肺结节挂什么科| 宝宝屁多是什么原因| 什么精神| 都有什么快递| 耿直什么意思| 视力矫正是什么意思| 想什么来什么是什么定律| 草酸是干什么用的| 烧心吃什么| 巾帼是指什么| 手上有红点是什么原因| 拔罐颜色紫黑代表什么| 除草剂中毒有什么症状| 开火车什么意思| 减肥吃什么坚果| 副脾结节是什么意思| 膝盖疼应该挂什么科| 天伦之乐是什么意思| 吃什么降尿酸| 田七蒸瘦肉有什么功效| 什么叫肾阴虚和肾阳虚| 黑豆加红枣有什么功效| 尿培养是检查什么病| 属马的跟什么属相最配| 新生儿满月打什么疫苗| 厥逆是什么意思| 什么是肝掌| 麦粒肿吃什么消炎药| 爱慕内衣什么档次| 网是什么结构的字| 早上5点多是什么时辰| 213什么意思| 吃了狗肉不能吃什么| 血压高压高是什么原因| 津是什么意思| 烧伤用什么药| 脑供血不足吃什么药好| 太乙是什么意思| 龋病是什么意思| 血沉高是什么意思| 梵蒂冈为什么没人敢打| 牛仔裤搭配什么衣服好看| 南瓜为什么叫南瓜| 阴历九月是什么星座| 纯天然无公害什么意思| 胸外科是看什么病的| 水晶绒是什么面料| 病理活检是什么意思| 为什么纯牛奶容易爆痘| 吃什么尿酸降得快| 破瓦法是什么| 为什么有狐臭| 寿司醋可以用什么代替| 酒精是什么| 打强心针意味着什么| 一天从早到晚叫什么日| 人为什么要吃饭| 中药木香的功效与作用是什么| 长脸适合什么眉形| 的确什么意思| 金达克宁和达克宁有什么区别| 甲亢是一种什么病| 七九年属什么的| 什么是前庭功能| 丁克什么意思| 寄居蟹喜欢吃什么| 劲仔小鱼是什么鱼做的| 有龙则灵的灵是什么意思| 这是什么皮肤病| 胃胀吃什么药| 乳腺瘤是什么引起的| 脚后跟痒是什么原因| 力不到不为财是什么意思| 八点半是什么时辰| 想起我叫什么了吗| 办理出院手续都需要什么| 血糖高吃什么水果降糖| 27属什么| 肩膀疼应该挂什么科| 水杉是什么植物| 房性期前收缩是什么意思| 容易受惊吓是什么原因| 没有奶水怎么办吃什么能下奶| 癫痫属于什么科| 怀璧其罪是什么意思| 女人能日到什么时候| 四肢肿胀是什么原因引起的| 浮躁什么意思| 九月十三是什么星座| 双是什么意思| 什么叫袖珍人| 便秘什么意思| 什么叫人彘| 柠檬泡水有什么好处| 公约是什么意思| 83年属猪是什么命| 梦见刮胡子是什么意思| 刺猬是什么动物| 什么惚惚| 破壁机什么牌子的最好| 霉菌性阴道炎用什么药最好| 非诚勿扰什么意思| 新诺明又叫什么| 百度Jump to content

2017年4月自学考试《毛泽东思想概论》答案(网友

From Wikipedia, the free encyclopedia
(Redirected from File system permissions)
百度 多少小伙伴们如今就盼望着春节快点来到,放假回家过年!然而,盼望着盼望着却发现~居然还有这样的“噩耗”,那就是——下周日(2月11日);放假回来的那个周六(2月24日)要上班!要上班!要上班!先来看一下春节放假表2月15日开始放假↓↓2月15日至21日放假调休,共7天。

Typically, a file system maintains permission settings for each stored item – commonly files and directories – that either grant or deny the ability to manipulate file system items. Often the settings allow controlling access based on function such as read, change, navigate, and execute and to different users and groups of users. One well-established technology was developed for Unix and later codified by POSIX. Another common technology is an access-control list (ACL) with multiple variants implemented in file systems and one codified by POSIX. Since POSIX defines both the older Unix-based technology as well as ACLs, the former is called traditional POSIX permissions for clarity even though it is not a well-known term.

A permission-driven user interface tailors the functionality available to the user based on file system item permissions. For example, the interface might hide menu options that are not allowed based on the permissions stored for an item.

Examples

[edit]

File system permissions have been implemented many ways. Some notable examples are described here.

NTFS which is in many versions of Windows including the current, uses ACLs to provide permission-based access control; NTFS ACLs are considered powerful yet complex.[1]

Linux file systems such as ext2, ext3, ext4, Btrfs support both POSIX permissions and POSIX.1e ACLs. There is experimental support for NFSv4 ACLs for ext3[2] and ext4 filesystems.

FreeBSD supports POSIX.1e ACLs on UFS, and NFSv4 ACLs on UFS and ZFS.[3][4]

HFS, and its successor HFS+, as implemented in the Classic Mac OS operating systems, do not support permissions.

macOS supports POSIX-compliant permissions, and supports them in both HFS+ and APFS. Beginning with version 10.4 ("Tiger"), it also supports the use of NFSv4 ACLs in addition to POSIX-compliant permissions. The Apple Mac OS X Server version 10.4+ File Services Administration Manual recommends using only traditional Unix permissions if possible. macOS also still supports the Classic Mac OS's "Protected"/"Locked" attribute as the "user immutable" flag in the 4.4BSD flags field.[5]

File Allocation Table (original version) has a per-file read-only attribute that applies to all users.

OpenVMS defines four access functions: read, write, execute and delete and user selections: system, owner, group, and world where world includes group which in turn includes owner and system selects system users. This design is similar to that of Unix with notable extensions: additional function: delete and additional user selection: system.[6] ACLs are supported in VMS 4.0 and later.[7]

Solaris ACL support depends on the filesystem being used; older UFS filesystem supports POSIX.1e ACLs, while ZFS supports only NFSv4 ACLs.[8]

IBM z/OS implements file security using RACF (Resource Access Control Facility)[9]

The AmigaOS Filesystem, AmigaDOS supports a permissions system relatively advanced for a single-user OS. In AmigaOS 1.x, files had Archive, Read, Write, Execute and Delete (collectively known as ARWED) permissions/flags. In AmigaOS 2.x and higher, additional Hold, Script, and Pure permissions/flags were added.

OpenHarmony operating system alongside its client side ecosystem in Oniro OS and HarmonyOS with HarmonyOS NEXT versions and also Linux-based openEuler server OS natively uses its Harmony Distributed File System (HMDFS) that supports access token manager (role-based access control) and Core File Kit API capability-based with granular permission management with exception to openEuler.[10][failed verification]

Traditional POSIX permissions

[edit]

Traditionally, file permissions on a Unix-based file system is defined by POSIX.1-2017,[11]. It specifies three classes (user, group and others) that allow for mapping permissions to users and three operations (read, write, execute) that can be granted or denied for each class. When a file is created, its permissions default to that as accessible via the umask command.

In a Unix-based file system, everything is a file; even directories and other special files.

Classes

[edit]

The classes determine how permissions map to a user. The user class permissions apply to the user who owns the file. The group class permissions apply to users of the file's owning group. The others class applies to other users.

The effective permissions are the permissions of the class in which the user falls first given the order: user, group then others. For example, the owning user has effective permissions of the user class even if they are in the owning group.

Operations

[edit]

The operations that can be granted or denied include:

  • Read grants the ability to read a file. When set for a directory, this permission grants the ability to read the names of contained files, but not to read other information about them such as contents, file type, size, ownership, permissions.
  • Write grants the ability to modify a file. When set for a directory, this permission grants the ability to modify entries in the directory, which includes creating, deleting and renaming files. This requires that execute is also set; without it, the write permission is meaningless for directories.
  • Execute grants the ability to execute a file. This permission must be set for executable programs to allow running them. When set for a directory, this permission is interpreted as the search permission – granting the ability to access file contents and metadata if its name is known, but not list files in the directory, unless read is set also.

The effect of setting the permissions on a directory, rather than a file, is "one of the most frequently misunderstood file permission issues".[12]

Unlike ACL-based systems, these permissions are not inherited. Files created within a directory do not necessarily have the same permissions as its containing directory.

Changing permission behavior with setuid, setgid, and sticky bits

[edit]

Three additional single-bit attributes apply to each file that are related to permissions and stored in the file mode along with permissions.

  • The set user ID, setuid, or SUID mode. Executing a file with this bit set results in a process with user ID set to the file's owning user. This enables users to be treated temporarily as root (or another user).
  • The set group ID, setgid, or SGID permission. Executing a file with this bit set results in a process with group ID set to the file's owning group. When applied to a directory, new files and directories created under that directory inherit their group from that directory. (Default behavior is to use the primary group of the effective user when setting the group of new files and directories, except on BSD-derived systems which behave as though the setgid bit is always set on all directories (see Setuid).)
  • The sticky mode (also known as the Text mode). The classical behavior of the sticky bit on executable files has been to encourage the kernel to retain the resulting process image in memory beyond termination; however, such use of the sticky bit is now restricted to only a minority of Unix-like operating systems (HP-UX and UnixWare). On a directory, the sticky permission prevents users from renaming, moving or deleting contained files owned by users other than themselves, even if they have write permission to the directory. Only the directory owner and superuser are exempt from this.

Representation

[edit]

Permissions are commonly represented in symbolic or octal notation.

Symbolic notation

[edit]

Symbolic notation is used in the long output format of command ls -l.

The first character of the output indicates the Unix file type which is not a permission even though its next to the permissions information. The remaining nine characters represent the grants for the user, group and others classes as groups of operation grants for read, write and execute. An operation is denied when shown as a dash or granted when shown as r for read, w for write or x for execute.

Examples:

  • -rwxr-xr-x: initial - indicates a regular file, next three rwx indicate that user class has all permissions and group and others classes (both r-x) have only read and execute
  • crw-rw-r--: initial c indicates a character special file, user and group classes (both rw-) have read and write permissions and others class (r--) has only read permission
  • dr-x------: initial d) indicates a directory, user class (r-x) has read and execute permissions and group and others classes (both ---) have no permissions

To represent the setuid, setgid and sticky/text attributes, the character in the third position for a class is modified; even though this position is otherwise only for execute and even though these attributes affect the file without concern for class. The setuid attribute modifies the execute character for the user class, the setgid attribute modifies the execute character for the group class, and the sticky or text attribute modifies the execute character for the others class. For setuid or setgid, x becomes s and - becomes S. For the sticky or text attribute x becomes t and - becomes T. For example -rwsr-Sr-t indicates a regular file, user class has read, write and execute permissions; group class has read permission; others class has read and execute permissions; and which has setuid, setgid and sticky attributes set.

Some systems show additional permission features:

  • + suffix indicates an access control list that can control additional permissions
  • . suffix indicates an SELinux context is present. Details may be listed with the command ls -Z
  • @ suffix indicates extended file attributes are present

Octal notation

[edit]

Permissions are often shown in octal notation; for example via the command stat -c %a. The notation consists of at least three digits. The last three digits represent the permission by class: user, group, and others. If a fourth digit is present, the leftmost represents the three special attributes: setuid, setgid and sticky.

Each operation grant is assigned a bit position that for an octal digit is:

  • Read: left, binary 100, octal 4
  • Write: middle, binary 010, octal 2
  • Execute: right, binary 001, octal 1

A class permission value is the sum or alternatively the logic OR of the grants.

Examples:

Symbolic Octal Description
---------- 0000 no permissions
-rwx------ 0700 read, write, & execute only for owner
-rwxrwx--- 0770 read, write, & execute for owner and group
-rwxrwxrwx 0777 read, write, & execute for owner, group and others
-rwxr----- 0740 owner can read, write, & execute; group can only read; others have no permissions

User private group

[edit]

Some systems diverge from the traditional POSIX model of users and groups by creating a new group – a "user private group" – for each user. Assuming that each user is the only member of its user private group, this scheme allows an umask of 002 to be used without allowing other users to write to newly created files in normal directories because such files are assigned to the creating user's private group. However, when sharing files is desirable, the administrator can create a group containing the desired users, create a group-writable directory assigned to the new group, and, most importantly, make the directory setgid. Making it setgid will cause files created in it to be assigned to the same group as the directory and the 002 umask (enabled by using user private groups) will ensure that other members of the group will be able to write to those files.[13][14]

See also

[edit]

References

[edit]
  1. ^ "File and Folder Permissions". Microsoft. 9 December 2009.
  2. ^ "Native NFSv4 ACLs on Linux". Archived from the original on October 12, 2008. Retrieved May 4, 2010.
  3. ^ "NFSv4_ACLs – FreeBSD Wiki".
  4. ^ "FreeNAS 9.1.1 Users Guide" (PDF). 2013. Archived from the original (PDF) on September 24, 2015.
  5. ^ Gite, Vivek (June 3, 2010). "Apple OS X: Write Protect File From Command Line".
  6. ^ "OpenVMS documentation". Archived from the original on March 5, 2012. Retrieved June 6, 2009.
  7. ^ "File Systems: Protection". CS322 Lecture Slides.
  8. ^ "Oracle Solaris ZFS Administration Guide" (PDF). Sep 2010.
  9. ^ "IBM Knowledge Center". Archived from the original on June 29, 2013.
  10. ^ "HarmonyOS Distributed File System Development Guide". Substack. LivingInHarmony Blog. 13 March 2024. Retrieved 13 March 2024.
  11. ^ "Definitions, 3.175 File Permission Bits". pubs.opengroup.org. 2025-08-14. Retrieved 2025-08-14.
  12. ^ Hatch, Bri (April 24, 2003). "Linux File Permission Confusion pt 2". Hacking Linux Exposed. Retrieved July 6, 2011.
  13. ^ Epstein, Brian. "The How and Why of User Private Groups in Unix". security.ias.edu. Institute for Advanced Study Network Security. Archived from the original on 8 August 2014. Retrieved 5 August 2014.
  14. ^ "Red Hat Enterprise Linux 7 System Administrator's Guide, 4.3.4 Creating Group Directories". Red Hat Customer Portal. Red Hat.
[edit]
珂字五行属什么 梅毒查血查什么项目 房产证改名字需要什么手续 坐北朝南什么意思 火碱对人体有什么害处
科目三为什么这么难 尿道感染是什么原因 炒作是什么意思 拐枣泡酒有什么功效 六月出生的是什么星座
耳堵是什么 超纤皮是什么 喉炎吃什么药效果最好 牙刷什么样的刷毛最好 宝宝拉肚子吃什么药好得快
老年人头晕是什么原因 世子是什么意思 肌张力是什么意思 下面有点痒用什么药 针眼用什么药
下鼻甲肥大是什么意思hcv9jop5ns4r.cn 抑郁症挂什么科hcv8jop3ns7r.cn 站着头晕是什么原因hcv7jop6ns7r.cn 脸上长粉刺是什么原因引起的hcv9jop6ns2r.cn 造影是检查什么chuanglingweilai.com
blub是什么意思hcv8jop0ns1r.cn 血糖高能喝什么粥imcecn.com 入职体检前要注意什么hcv9jop6ns5r.cn 女强人是什么意思hcv9jop8ns1r.cn 痛风该吃什么药好得快hcv8jop1ns1r.cn
ad是补什么的hcv8jop4ns7r.cn 肌肉紧张是什么症状hcv9jop7ns5r.cn 小松鼠吃什么食物hcv9jop4ns6r.cn 什么是丁克hcv7jop6ns6r.cn 有偿什么意思hcv7jop6ns7r.cn
姜水什么时候喝最好dajiketang.com 经常头疼什么原因hcv7jop6ns1r.cn 四是什么生肖hcv8jop7ns1r.cn 筑基期后面是什么hcv7jop7ns0r.cn 花痴什么意思hcv9jop1ns7r.cn
百度