Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

From this page,, I understand that I need the +w bit set in a directory to create a new file and +x bit to cd into it/access its inode. So far, so good. But, I can't use vi/cat/nano/echo etc to do stuff like:

echo hello > dir/file

because I can't access inode of dir. My question is, how do I create/delete/rename a new file in dir if I can't access its inode ? Can I edit the directory structure using

vi dir

and create/edit/rename a new file? Is there a tutorial to do so ?

share|improve this question
up vote 0 down vote accepted

If you don't have +x even if you have +w, you can not create new entries in the directory, neither files nor directories.

share|improve this answer
If you don't have +x, to my knowledge, you can't even cd to that directory? And if you can't even cd to that directory, it then implies you can't do any action into the directory? Why not chmod the directory and add +x on it? – Darius Oct 14 '13 at 4:43
I wanted to understand the point of +w used alone on directories. So, even to create a new file, I need +x ? – user2103008 Oct 14 '13 at 4:49

The x permission on directories is a "lookup" permission. It is needed to get hold of dentry in the directory by name.

Since each and every filesystem operation starts with a lookup on the target path, you have absolutely no access to content of a directory where you don't have x permission. There is thus no point in having w without x, because creating dentries in the directory requires lookup permission there.

The fact that you can't cd is kind of side-effect, because it looks up . inside the directory, not just the directory itself (you still can stat the directory).

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .