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.

  • 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

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.

  • 1
    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 Sep 1 '15 at 8:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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