0

This just happened that drove me crazy for almost 2 hours: I run firebird 2.5 at my server and I have a specific directory in my home where I put the databases for the daemon to read.

This directory is owned by firebird:firebird as all the databases inside and has 700 permissions (the dbs files have 600).

A few days ago I removed the list permission from my home directory chmod o-x xxx and today Firebird started to refuse to open the databases with:

-Error while trying to open file
-Permission denied

It took me a while to connect the two things because:

  1. The databases inside were owned by the correct firebird user.
  2. The parent directory were also owned by firebird.
  3. All the permissions were ok.
  4. I always believed you can have a parent directory with less permissions than a child.

So this is "somewhat" a firebird bug and I shall report it or it's my bad?

  • You need execute permissions in order to traverse a directory. – Ignacio Vazquez-Abrams May 07 '18 at 22:32
  • I know that, the question is if the firebird daemon needs the traverse permission to open the database with an absolute path.. it should not be necessary in my opinion. – pragmatic_programmer May 08 '18 at 02:25
  • [**EACCES** The requested access to the file is not allowed, or ***search permission is denied for one of the directories in the path prefix of pathname***, or the file did not exist yet and write access to the parent directory is not allowed.](https://linux.die.net/man/2/open) (emphasis mine) – Ignacio Vazquez-Abrams May 08 '18 at 02:29
  • Didn't know that search permission is needed in all the parents.. is not very logical IMHO. Anyway that was the cause, thanks! Submit the answer if you want it to be accepted. – pragmatic_programmer May 08 '18 at 02:55

0 Answers0