LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Permission denied /var/lib/postfix/master.lock error (http://www.linuxquestions.org/questions/linux-newbie-8/permission-denied-var-lib-postfix-master-lock-error-4175447225/)

landysaccount 01-25-2013 04:01 PM

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

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:

Code:

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 05: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 08:52 AM

Postfix IS running under postfix.

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

jpollard 01-26-2013 01: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 01: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.
---
Edit:
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 03:34 AM.