Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I have restarting the postfix server I am facing the below error ::

postfix-out/master[1714]: fatal: open lock file pid/ cannot create file exclusively: Permission denied

I having a centos server.

share|improve this question
Are you running this as root? – Khaled Feb 2 '13 at 11:38
How exactly are you restarting it? Is there still a master process running after you try this? – mgorven Feb 5 '13 at 1:07
Yes I am running the service as a root.I am making an instance server but when I restart the service I am getting the error. – jenni Feb 5 '13 at 9:29

You can use this command to fix permissions on postfix files and directories.

postfix set-permissions

The file that controls these permissions is located here:


There may have been a stale file or or existing postfix process running, to clear these you could have done:

service postfix stop
pkill -9 postfix
rm -f /var/spool/pid/
postfix set-permissions
service postfix start
share|improve this answer

This file is created every time postfix starts.

In debian the file is created in /var/lib/postfix/master.lock, you have to looking for the directoyr of your postfix an check the permissions and the owners of it.

share|improve this answer
I have checked the permission and the permission are correct as below:: ls -ld /var/lib/postfix/master.lock -rw-------. 1 postfix postfix 33 Feb 5 11:07 /var/lib/postfix/master.lock Can you please tell me what to do next? – jenni Feb 5 '13 at 9:13
if postfix are not running and master.lock file exist you should delete it then postfix can create it when starts. – Brigo Feb 6 '13 at 11:12

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.