Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I ran a simple command "mail" on my Suse Linux 11.1 box and it's display "/var/mail/john: Permission denied"

I had two users, john and peter

When I login as peter and ran "mail" it display the same error when I login as john

"/var/mail/john: Permission denied"

I'm using postfix as my MTA.

Your help will be much appriciated.


Thanks guys,

Here's the output from the command ls -l /var/mail

lrwxrwxrwx 1 root root 10 2011-08-06 11:54 /var/mail -> spool/mail

Here's the out output when I run echo $MAIL

/var/mail/john

I login with different user and run echo $MAIL it output the same line /var/mail/john

share|improve this question

migrated from stackoverflow.com Aug 26 '11 at 1:59

This question came from our site for professional and enthusiast programmers.

    
ls -l /var/mail/ could help diagnosing the problem. –  Turbo J Aug 26 '11 at 3:31
    
In addition to the above output, the output of echo $MAIL would be useful. –  Chad Feller Aug 26 '11 at 17:25

2 Answers 2

The user is probably not in the mail group.

You can run groups to check in which groups you are. As said we also need the output of ls -l /var/mail

share|improve this answer

Just fixed a similar issue which arose after I had migrated /home and /var/spool/mail from another system. The owners, groups and perms were all correct... yet I was still getting this error. I tarred them with "tar cvfp" and untarred them with "tar xvfp" and MAGICALLY, this corrected the problem!

There must have been some bogus ACL's or resource forks or some other kind of bad mojo on the files. Whatever. The main thing is, the voodoo worked.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.