I'm editing a file within a directory /parentdir/userdir/file with the following permissions:

$ sudo namei -l $(pwd)
drwxr-xr-x   root   root   /
drwx------   root   root   parentdir
drwx--S---   myuser myuser userdir
-rw-------   myuser myuser file

Additionally, both parentdir and userdir have set a facl rule that, by default, creates files and directories without any permission for group or others. In any case, my PWD is /parentdir/userdir and I have full permissions to edit file.

However, if I edit file using emacs, when trying to save the changes, it says to me that the directory /parentdir/userdir/ doesn't exists, and asks me if I want to create it.

How can I skip that message in a safe way? Maybe the reason is that emacs is trying to save the file using absolute paths, and it gets confuses since it has no execute permissions to access that directory.

  • Assuming you're myuser, how are you in that directory, when you have no permission to be there? I presume you're suggesting that other programs are allowing you to write to that file? Can you provide a recipe to reproduce this scenario?
    – phils
    Jul 18, 2021 at 9:19

1 Answer 1


Your question is poorly written, but yes, that error is because there's no way to traverse into the directory.

  • Sorry I'm not a native english speaker and sometimes it's hard for me to use it properly. Feel free to improve it :D By the way, isn't there a way to force emacs to use relative paths when saving files instead of resolving their real paths?
    – ABu
    Jun 22, 2020 at 20:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.