Solved

File is Locked

Posted on 2003-10-27
3
253 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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Save file from one Ubuntu machine to another? 7 84
Change IP on Red Hat Server 6 42
Fail2Ban restart 5 68
SSH agent doesn't keep keys after reboot on Debian 20 137
​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…
Fine Tune your automatic Updates for Ubuntu / Debian
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

803 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