Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
What distribution is this? What are the ownership and permissions for all the directories leading up to this one? –  Michael Hampton Jan 26 '13 at 16:24
l /var/lib/ drw------- 2 postfix postfix 4.0K Jan 26 15:51 postfix –  Wilson Jan 26 '13 at 16:27
Why is your directory not +x? +x is here to allow directory traversing. –  Heis Spiter Jan 26 '13 at 16:32
It is, typo: drwxr-xr-x 2 postfix postfix 4.0K Jan 26 15:51 postfix –  Wilson Jan 26 '13 at 16:40
Jan 26 16:38:03 hawk084 postfix/master[10643]: fatal: open lock file /var/lib/postfix/master.lock: cannot open file: Permission denied –  Wilson Jan 26 '13 at 16:41

1 Answer 1

up vote 1 down vote accepted

Give us the permissions for:


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.

share|improve this answer
Solved... Permissions to /var/lib were not correct: 700, changed to 755 and things worked afterwards. Thanks for replying and helping out. –  Wilson Jan 27 '13 at 4:20
Also mine was a problem of permissions on master.lock file. It was 500, moved to 755 and now it's ok. Thank you. –  TechNyquist yesterday

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.