Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect Postfix files/folders ownership #1

Open
alexeapps opened this issue Nov 15, 2017 · 2 comments
Open

Incorrect Postfix files/folders ownership #1

alexeapps opened this issue Nov 15, 2017 · 2 comments

Comments

@alexeapps
Copy link

@ihorman, after provisioning a Plesk environment, Postfix will fail to start because of incorrect ownership of some files/folders:

# cat /var/log/mail.err
Nov 15 16:06:23 node26556-plesk111 postfix/master[912]: fatal: open lock file /var/lib/postfix/master.lock: cannot open file: Permission denied
Nov 15 16:06:24 node26556-plesk111 postfix/postfix-script[1454]: fatal: the Postfix mail system is not running
Nov 15 16:10:58 node26556-plesk111 postfix/master[5279]: fatal: remove public/pickup: Permission denied

Some files/folders are owned by an user/group with different UID than postfix:

# ls -al /var/lib/postfix
total 12
drwxr-xr-x  2  105  113 4096 Sep 20 15:18 .
drwxr-xr-x 51 root root 4096 Oct 30 16:30 ..
-rw-------  1  105  113   33 Sep 20 15:18 master.lock
# ls -al /var/spool/postfix/
total 80
drwxr-xr-x 20 root root 4096 Sep 20 15:18 .
drwxr-xr-x  7 root root 4096 Oct 30 16:27 ..
drwx------  2  105 root 4096 Sep 20 15:18 active
drwx------  2  105 root 4096 Sep 20 15:18 bounce
drwx------  2  105 root 4096 Sep 20 15:18 corrupt
drwx------  2  105 root 4096 Sep 20 15:18 defer
drwx------  2  105 root 4096 Sep 20 15:18 deferred
drwxr-xr-x  2 root root 4096 Nov 15 16:06 dev
drwxr-xr-x  3 root root 4096 Nov 15 16:10 etc
drwx------  2  105 root 4096 Sep 20 15:18 flush
drwx------  2  105 root 4096 Sep 20 15:18 hold
drwx------  2  105 root 4096 Sep 20 15:18 incoming
drwxr-xr-x  3 root root 4096 Sep 20 15:18 lib
drwx-wx--T  2  105  114 4096 Sep 20 15:18 maildrop
drwxr-xr-x  2 root root 4096 Sep 20 15:18 pid
drwx------  2  105 root 4096 Sep 20 15:19 private
drwx--s---  2  105  114 4096 Sep 20 15:19 public
drwx------  2  105 root 4096 Sep 20 15:18 saved
drwx------  2  105 root 4096 Sep 20 15:18 trace
drwxr-xr-x  3 root root 4096 Sep 20 15:18 usr

This can be corrected by assigning correct ownership and then Postfix will start:

# chown -R postfix.postfix /var/lib/postfix/
# find /var/spool/postfix/ -user 105 -exec chown postfix '{}' '+'
# chown -R postfix.postfix /var/spool/postfix/maildrop/ /var/spool/postfix/public/
@alexeapps alexeapps changed the title Incorrect Postfix ownership Incorrect Postfix files/folders ownership Nov 15, 2017
@siruslan
Copy link

@alexeapps, you can apply an extra customization commands in the JPS package (for example). But I think it should be fixed at the Plesk docker repo.

+@sibprogrammer from Plesk for visibility

Also, please note that current package uses plesk:preview tag. You can change it to the latest or 17.05

@sibprogrammer
Copy link

Postfix is not a part of Docker image. If you try to install it using Plesk autoinstaller after image deployment, permission will be ok. So the only question is how the Postfix was installed to get the wrong permission.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants