topics that matter; ideas worth sharing

share a tip, submit a link, add something new

Can't open/chown savefile

March 15, 2005, 02:48 PM —  ITworld.com — 

Today's column is another troubleshooting tale - a real story from the pits of systems administration. And, although the solution to the particular problem encountered turned out to be trivial, the process of tracking it down involved some interesting turns and insights into little known details about the mail command works on a Unix system.

While the subject of today's troubleshooting tale relates to email, the problem cropped up on a server that is anything but a mail server. In fact, any mail stored on the box is exclusively generated on the box and comprises the output of scripts that are run through cron to assist in monitoring various processes and applications. For this reason, the problem didn't get much notice and persisted for a long period of time before anyone thought to complain.

The problem itself was simple, but annoying. Specifically, anytime users on the problematic server quit the mail command after both reading and deleting messages, they would be faced with the message "mail: Cannot open savefile". Afterwards, their inboxes remained intact; in other words, deleted messages had not been removed. Since most of these users weren't interested in the particular cron job output email after perusing it once, they would remove the entire mail file and then go through the same procedure the next day.

Eventually, someone decided to ask why the mail command was giving them such a hard time and, after verifying the nature of the problem, attention was focussed on the troublesome server.




Checking the Server



The /var/mail/directory on the server looked more or less as anyone would have expected it to look. Each user's mail file was owned by the particular user and the group associated with all of the mail files was "mail".

drwxrwxr-x   2 root     mail         512 Mar 18 12:34 :saved
-rw-rw----   1 carolt   mail        3929 Mar 18 07:11 carolt
-rw-rw----   1 flyguy   mail        1860 Mar 18 10:19 flyguy
-rw-rw----   1 jdoe     mail         504 Mar 17 13:05 jdoe
-rw-rw----   1 zippo    mail        1336 Mar 18 09:00 zippo


Even so, it was easy to confirm that any of these users encountered the same error any time they tried to delete their mail within the purview of the mail command.




What's Different?



The old trick of comparing a "broken" system with a working system didn't lead to any revelations. Comparing the /var/mail directory with the same directory on another server (exhibiting no such mail problems), it was clear that file permissions weren't the issue. Even the :saved directory appeared to be identically configured.




Checking the Web




As is usually the case with problems of this sort, a small population of sysadmins had encountered the same or similar problems and

I like it!
Post a comment
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
Resources
White Paper

Symantec Backup Exec 12 and Backup Exec System Recovery 8 deliver industry leading Windows data protection and system recovery. Download this whitepaper to find out the top reasons to upgrade and how to get continuous data protection and complete system recovery.

Webcast

Data and system loss — from a hard drive failure, malicious attack, natural disaster, or simple human error — can happen anytime. Don’t leave your business vulnerable. Make sure you have a secure recovery strategy in place. Symantec's latest backup and system recovery technology can efficiently restore critical applications, individual emails and documents and even restore your entire system in minutes in the event of a loss.

White Paper

Businesses face a growing challenge to ensure that the IT environment is properly protected. Backup Exec 12 integrates with other applications in the Symantec family of products, to complement your current data protection strategy, keep your data securely backed up and make it recoverable when you need it most.

Free stuff
Featured Sponsor

AISO founders envisioned a Web hosting company that was environmentally friendly. While the company employed energy-efficient innovations like solar panels, its infrastructure produced unacceptable power and cooling requirements. Find out how AISO leveraged AMD technology to overcome their challenge in this case study white paper.

In this whitepaper, Scalar explores the opportunity to change the landscape with respect to mission critical databases built around Oracle. Leveraging technologies such as Linux, high-end commodity processing power and Oracle RAC technology to architect, design, build and maintain database infrastructure that delivers maximum availability, reliability and performance at a fraction of traditional cost.

On a typical day, weather.com, the Web site for The Weather Channel in Atlanta, serves up between 15 million and 20 million page views. But in September 2004, when back-to-back hurricanes ransacked Florida, the peak traffic on one day more than tripled: over 70 million page views by more than 7 million unique visitors. Read the full success story now.

More Resources