LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 01-25-2013, 05:01 PM   #1
landysaccount
Member
 
Registered: Sep 2008
Location: Dominican Republic
Distribution: Debian Squeeze
Posts: 177

Rep: Reputation: 17
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.
 
Old 01-26-2013, 06:32 AM   #2
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,298

Rep: Reputation: 123Reputation: 123
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.
 
Old 01-26-2013, 09:52 AM   #3
landysaccount
Member
 
Registered: Sep 2008
Location: Dominican Republic
Distribution: Debian Squeeze
Posts: 177

Original Poster
Rep: Reputation: 17
Postfix IS running under postfix.

I've already tried removing master.lock and continue with the same problem.
 
Old 01-26-2013, 02:23 PM   #4
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 2,284

Rep: Reputation: 590Reputation: 590Reputation: 590Reputation: 590Reputation: 590Reputation: 590
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.
 
Old 01-26-2013, 02:29 PM   #5
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,298

Rep: Reputation: 123Reputation: 123
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!)

Last edited by pingu; 01-26-2013 at 03:07 PM. Reason: Caution!
 
  


Reply

Tags
debian squeeze, postfix


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
open lock file /var/lib/postfix/master.lock: cannot open file: Permission denied gabsik Linux - Server 6 08-30-2012 10:39 PM
Could not open lock file /var/lib/dpkg/lock - open (13 Permission denied) basina Linux - Laptop and Netbook 3 09-05-2011 06:18 PM
DHCP on CentOS 4.7 - /var/lib/dhcp/dhcpd.leases: Permission denied Latitude Linux - Networking 1 06-05-2009 03:08 AM
error: cannot get exclusive lock on /var/lib/rpm/Packages orly Linux - Software 2 09-06-2004 08:13 AM
error:cannot get exclusive lock on /var/lib/rmp/packages mateka Linux - Newbie 1 06-26-2004 11:07 PM


All times are GMT -5. The time now is 12:17 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration