You need to enable JavaScript to run this app. 关于chmod文件权限中others是否包含系统权限及chmod w+x执行效果的疑问
优惠活动
大模型
产品
解决方案
定价
更多

关于chmod文件权限中others是否包含系统权限及chmod w+x执行效果的疑问

关于chmod文件权限中others是否包含系统权限及chmod w+x执行效果的疑问

Hey there! Let's break down your questions clearly and simply:

Short answer: Yes, but with a critical exception for the root user.

The "others" (third permission set) covers every user on your system who isn't the file's owner and isn't part of the file's group. That includes all system users—like root, daemon, www-data, or any service-specific accounts created by your OS.

But here's the key caveat: root (the superuser) bypasses nearly all file permission checks entirely. Even if "others" have zero access, root can still read, write, or execute the file without restriction. For non-root system users (like those running background services), though, they're bound by the "others" permissions if they aren't the file's owner or in its group.

Second: What happens when you run chmod w+x?

When you use chmod without specifying a user category (like u for owner, g for group, o for others), the change applies to all three categories by default. So chmod w+x file will:

  • Add write (w) permission to anyone who didn't already have it (in your example, that's the "others" group, since owner and group already had w)
  • Add execute (x) permission to the owner, group, and others.

For your example file with permissions -rw-rw-r, running this command would change it to -rwxrwxrwx—everyone (owner, group, others) gets full read/write/execute access.

If you only wanted to grant write and execute to "others" specifically, you'd need to run chmod o+w+x file instead. That would modify only the third permission set, turning your example into -rw-rw-rwx.

Just to clarify: "the system" doesn't have a single set of permissions—all system processes run under specific user accounts. If a process runs as root, it ignores these permissions regardless. If it runs as a regular system user, its access is governed by which permission category it falls into.

备注:内容来源于stack exchange,提问作者Samir Fink

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.16 09:33:02