Solved

File is Locked

Posted on 2003-10-27
3
250 Views
Last Modified: 2010-04-22
I am new to Linux - so I have a question.  I updated my aliases file and wanted to re-initialize it but I am getting this message.  Any way to check to see what is wrong?

Alias file /etc/aliases is locked (maybe being rebuilt)

Is someone else in it?  How do I check that?

Thanks for your help
0
Comment
Question by:suzbara
3 Comments
 
LVL 12

Accepted Solution

by:
paullamhkg earned 150 total points
ID: 9632041
try ps -aux to see any other process using the file /etc/aliases, or any dead process, if find, kill -9 PID to kill the process and try again.

eg.
USER       PID %CPU %MEM   VSZ   RSS TTY      STAT START   TIME COMMAND
root     19866  0.0     0.5       2640  696  pts/0       R    15:28       0:00 ps -aux

so the PID of the ps -aux is 19866, and if I want to delete these process just 'kill -9 19866' the process of ps -aux will kill and close.

remember you must be the root to do the kill process

so if you kill the process which holding your /etc/aliases, you should able to use it again. remembr to make a backup copy of your /etc/aliases before you kill any process related to /etc/aliases.

Hope this can help
0
 
LVL 6

Assisted Solution

by:mbarbos
mbarbos earned 25 total points
ID: 9632625
You might try using lsof (lsof /etc/aliases would be the command) to find out who is locking the file. And than kill the offender as paullamhkg said.
Try first just a kill, kill -9 might be a bit too drastical to start with.

0
 
LVL 2

Author Comment

by:suzbara
ID: 9637662
Thanks guys.  The file was actually released after a bit... but I will keep this for next time!!!

:)  S
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

​Being a Managed Services Provider (MSP) has presented you  with challenges in the past— and by meeting those challenges you’ve reaped the rewards of success.  In 2014, challenges and rewards remain; but as the Internet and business environment evol…
BIND is the most widely used Name Server. A Name Server is the one that translates a site name to it's IP address. There is a new bug in BIND (https://kb.isc.org/article/AA-01272), affecting all versions of BIND 9 from BIND 9.1.0 (inclusive) thro…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now