-   Linux - Newbie (
-   -   Permission denied /var/lib/postfix/master.lock error (

landysaccount 01-25-2013 05:01 PM

Permission denied /var/lib/postfix/master.lock error

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 have exactly the same configurations as from the older server which is also running on debian squeeze.

Any suggestions?
Thanks in advanced for your time.

pingu 01-26-2013 06:32 AM

Two things:
Under which account is postfix running? It should be "postfix" according to file permissions, check that.
If that is correct, try removing the file /var/lib/postfix/master.lock.

landysaccount 01-26-2013 09:52 AM

Postfix IS running under postfix.

I've already tried removing master.lock and continue with the same problem.

jpollard 01-26-2013 02:23 PM

How about ownership and protection of the directory /var/lib/postfix? If the directory itself is not owned by postfix and/or the protection mask doesn't allow rwx, then the file cannot be created (that requires writing into the directory), and without x, cannot be searched during an open. Normally the lock file would be created if is missing, or just reused if present.

pingu 01-26-2013 02:29 PM

Good thinking, jpollard!
If that doesn't help, try temporary change permission on /var/lib/postfix and below to 777. If you still get the same error messsage then we need look somewhere else.
And with "temporary" I mean *temporary*!
That is, only keep it that way while testing, some 10 seconds or so, then immediately change back!
You never ever want world writable files on your server!
(Maybe you know this, but I felt I have to mention it - better safe than sorry!)

All times are GMT -5. The time now is 08:35 AM.