惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

月光博客
月光博客
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
阮一峰的网络日志
阮一峰的网络日志
罗磊的独立博客
T
Tailwind CSS Blog
博客园_首页
博客园 - 司徒正美
Google DeepMind News
Google DeepMind News
Hugging Face - Blog
Hugging Face - Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
V
V2EX
J
Java Code Geeks
量子位
D
DataBreaches.Net
MongoDB | Blog
MongoDB | Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Microsoft Azure Blog
Microsoft Azure Blog
P
Proofpoint News Feed
C
Check Point Blog
V
Visual Studio Blog
H
Help Net Security
Recent Announcements
Recent Announcements
Engineering at Meta
Engineering at Meta

ashishb.net

A day in Luxembourg - the richest country in the world I was asked to install malware during a fake interview Book summary: Breakneck - China's quest to engineer the future by Dan Wang Book summary: How to Teach Your Baby to Read Book Summary: The Discontented Little Baby Book by Pamela Douglas Introducing Amazing Sandbox - run third-party tools and AI agents securely on your machine Why software outsourcing gets a bad reputation? Book summary: The Natural Baby Sleep Solution by Polly Moore A day in Antwerp, Belgium Journey of online influencers Two days in Brussels, Belgium Shortcuts - when we love them and when we don't A visit to Rakhigarhi Three days in overhyped Paris Empty Japan, crowded Tokyo The real lock-in in GitHub is not the code, but the stars 11-day Norwegian Breakaway East Caribbean cruise Sanskrit and Sri Lankan Air Force Use REST with Open API The Achilles heel of American capitalism Costa Rica in 4 days At a juice stall in Sri Lanka A short stay at Warsaw, Poland Best practices for using Python & uv inside Docker Two days in Vilnius, Lithuania How IntelliJ IDEs waste disk space Pregnancy Why there aren't many digital nomads from India Two days in Riga, Latvia To keep your machine secure, run third-party tools inside Docker
Understanding Directory Permissions on Linux
Ashish Bhatia · 2010-07-11 · via ashishb.net

This blog post is for those who understand how file permissions work but are looking for an explanation on how file permissions behave when they are applied to directories.

Execute permission:

given a filename(or dir name) which is directly under this directory, it can be translated into its inode number only if this permission is available. (In Layman’s language, inode number’s are needed to access a file’s metadata and actual data on Linux). With an exec-only permission, a user can access a file/subdir only if he knows its complete name.

Read permission:

If this permission is available then one can see the names of the files/subdirs which are directly under this directory but cannot change these names. (but note that, without dir permission, one cannot still translate these names into inode numbers and hence, cannot reach the actual file/subdir)

Note: try making a dir read-without-exec and do “ls dir” and “ls -l dir” to see the difference. “ls -l” actually accesses the file info for which it needs access to its inode number and thus, it does not complete successfully unless exec permission on dir is available.

Write+Execute permission:

If this permission is available then one can add/remove a new file/subdir directly under this dir (even if the user does not own that file, it can still be changed/deleted, enable sticky bit to prevent that)

Note:

  1. IMHO “write only” permission on dir is useless (if someone knows any use of it please do mention that in comments)