File within a root grandparent is detected by emacs as belonging to a directory that doesn't exists

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.

Emacs Asked on November 30, 2021

1 Answers

One Answer

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

Answered by db48x on November 30, 2021

Add your own answers!

Related Questions

Match undone in sparse tree

2  Asked on February 9, 2021 by ivan-perez


Different fill-column for comments than code in programming modes

1  Asked on February 5, 2021 by daniel-doherty


How can I get a ruler at column 80?

8  Asked on February 3, 2021 by jorgen-schfer


Relationship between Skeleton and Tempo

1  Asked on February 2, 2021


keybinding behavior and smartparens

0  Asked on January 30, 2021 by andi


Emacs keeps overwriting files in Haskell mode

1  Asked on January 30, 2021 by ashesh


Continuously redirect debugging information (e.g. *Messages*) to file

0  Asked on January 29, 2021 by alexey-shiklomanov


how do I customize spacemacs default buffer

3  Asked on January 28, 2021 by fangxing


Open PDF files with pdf-tools does not work

0  Asked on January 23, 2021 by infinitelooper


org-mode document structure / templates

1  Asked on January 22, 2021 by mr-hasquestions


use-package and package-initialize problem with emacs27

1  Asked on January 15, 2021 by chakravarthy-raghunandan


Recentf list not updated

0  Asked on January 9, 2021 by gub


Aggregate tag lists for completion in orgmode

0  Asked on January 8, 2021 by user1683620


Ask a Question

Get help from others!

© 2022 All rights reserved.