Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #269460

Re: Dovecot correct ownership for logs

From Greg Wooledge <greg@wooledge.org>
Newsgroups linux.debian.user
Subject Re: Dovecot correct ownership for logs
Date 2024-05-19 17:10 +0200
Message-ID <IFQkF-eqWs-11@gated-at.bofh.it> (permalink)
References <IFQaZ-eqDs-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sun, May 19, 2024 at 04:55:09PM +0200, Richard wrote:
> Dovecot expects execution permissions on the directory it writes the logs
> to. Because "Standard POSIX permissions for a non-root process to enter a
> directory." How on earth is that even a thing?

That's how Unix permissions have always worked.  In order to access
a file, you need +x permissions on *all* of the directories leading
up to that file, and then appropriate permissions on the file itself.

If you have read permission on a directory but *not* execute permissions,
then the only thing you can do is read the contents of that directory --
the filenames and their inode numbers.  You cannot stat() the files,
so you can't see who owns them or even what kind of files they are.
Just their names.

If you have execute permission but *not* read permission on a directory,
then you can access the files within the directory, but only if you
already know their names.  You can't read the directory to get their
names.

Likewise, write permission on a directory allows you to rename or unlink
files contained within that directory (because the names are not a
property of the files -- they are part of the *directory*).  You don't
need write permission on a file to unlink it.  Only on the directory.

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Dovecot correct ownership for logs Richard <rrosner5@gmail.com> - 2024-05-19 17:00 +0200
  Re: Dovecot correct ownership for logs Greg Wooledge <greg@wooledge.org> - 2024-05-19 17:10 +0200
    Re: Dovecot correct ownership for logs Stefan Monnier <monnier@iro.umontreal.ca> - 2024-05-19 17:20 +0200
      Re: Dovecot correct ownership for logs Michael Kjörling <2695bd53d63c@ewoof.net> - 2024-05-19 18:30 +0200
    Re: Dovecot correct ownership for logs Richard <rrosner5@gmail.com> - 2024-05-19 17:20 +0200
      Re: Dovecot correct ownership for logs Greg Wooledge <greg@wooledge.org> - 2024-05-19 17:40 +0200

csiph-web