zimbra_logo

 

In one my client  mail server Postfix is stopped after restarting. I post this error along with solution for that.
You cannot start Postfix
You see this error:

 

fatal: open lock file /opt/zimbra/data/postfix/data/master.lock: cannot open file: permission denied

 

Cause
This failure is caused by incorrect permissions on this file  /opt/zimbra/data/postfix/data/master.lock

 

Resolution

The /opt/zimbra/data/postfix/data/master.lock file should be owned by the user postfix.

 

 

To correct ownership on the file:

 

Run this command as root:

#/opt/zimbra/libexec/zmfixperms

 

Try starting postfix again, by running this command as the zimbra user:

$su – zimbra
$postfix start

 

If postfix fails to start, and returns the same error:

 

 

Run this command as root:

#su – root
#/opt/zimbra/libexec/zmfixperms -extended

 

Note: This option can take a significant amount of time to run, in large deployments.

 

 

Try starting postfix again by running this command as the zimbra user:

$postfix start

 

If postfix continues to fail to start, check the file by running this command:

$ls -l /opt/zimbra/data/postfix/data/master.lock

 

The output should be similar to:

-rw——- 1 postfix postfix 33 2013-10-26 13:52 /opt/zimbra/data/postfix/data/master.lock

 

Note: The first username, colored here in red, is the owner of the file.

 

 

If the file is not owned by the postfix user, change the owner by running this command as root:

#chown postfix /opt/zimbra/data/postfix/data/master.lock

 

If this lock file does not exist:

Check the permissions on the folder by running this command:

$ls -ld /opt/zimbra/data/postfix/data/

 

They should look similar to:

drwxr-xr-x 2 postfix postdrop 4096 2013-10-24 23:30 /opt/zimbra/data/postfix/data/

 

 

Check the permissions on the parent folder by running this command:

$ls -ld /opt/zimbra/data/postfix/

 

 

They should look similar to:

drwxr-xr-x 4 postfix zimbra 4096 2013-10-24 19:12 /opt/zimbra/data/postfix/

 

 

If the permissions are not correct, update them.

Make sure that the postfix user can write to the …postfix/data/ folder . As the postfix user, run this command:

 

 

$touch opt/zimbra/data/postfix/data/master.lock

Once the permissions on the file and folders are fixed, start postfix by running this command as the zimbra user:

$postfix start