Skip to content

Solved Pending: postfix Permission denied /var/lib/postfix/master.lock error

1 down vote favorite 1

I recently migrated to a different server at a different location and now I'm experiencing a weird problem:

postfix/master[1281]: fatal: open lock file /var/lib/postfix/master.lock: cannot open file: Permission denied

I've googled around and can't get it to work. I've checked permission on /var/lib/ and things look good there:

hawk084:/var/lib/postfix# l total 20K -rw------- 1 postfix postfix 0 Jan 25 19:06 master.lock -rw------- 1 postfix postfix 1.0K Jan 6 02:48 prng_exch -rw------- 1 postfix postfix 8.0K Jan 6 00:43 smtpd_scache.db -rw------- 1 postfix postfix 8.0K Jan 6 00:43 smtp_scache.db

hawk084:/var/lib/postfix# /etc/init.d/postfix status postfix is not running.

I uninstalled postfix and re-installed it but, nothing fixes this damn problem.

I even removed master.lock but, nothing changed. Postfix is running under "postfix" user account as default.

I have exactly the same configurations as from the older server which is also running on debian squeeze. postfix shareimprove this question

edited Jan 26 '13 at 16:22 Michael Hampton 145k22271547

asked Jan 26 '13 at 16:20 Wilson 10814

add a comment 1 Answer active oldest votes up vote 1 down vote accepted

Give us the permissions for:

/ /var /var/lib /var/lib/postfix

Most likely one of those 4 folders up above doesn't have the correct permissions. Also, what's the output of running the following:

sudo -u postfix /bin/bash touch /var/lib/postfix/master.lock

If it's successful, then the user that writes to master.lock isn't postfix, it's a different one. shareimprove this answer

answered Jan 26 '13 at 19:05 Marcos Velazquez 33113

https://serverfault.com/questions/472662/permission-denied-var-lib-postfix-master-lock-error