QPopper - Failed to create /var/spool/pop/.username.pop

Hi, all,

I'm familiar with Linux, but by no means an expert. And I have a new Debian with one problem I can't seen to solve. When a user logs in to fetch his mail, he gets the message:

-ERR [SYS/TEMP] Failed to create /var/spool/pop/.username.pop with uid 1000, gid 0. Change permissions.

I looked at /var/spool/pop; the owner is root:mail, permissions drwxrwsr-x (2775), just like they should be.

Everything I see looks good - but still the message. Of course, I could change the permissions to 2777, but that's definitely not ideal.

Could someone please tell me what I'm doing wrong?

TIA.

Jerry

5 Replies

I'm assuming the user has uid 1000, but why is the gid 0? Shouldn't that be the gid for mail? My guess is that the qpop server should be setgid mail or the configuration in xinetd should specificy that it runs with gid mail.

(I don't use Debian and don't use qpopper but that's where I would look).

Hi, Stephen, and thanks for responding - it's the first help I've gotten on this problem.

Your response got me aimed in the right direction, anyway. I looked at the working system, and indeed, it is creating the file with uid:gid username:mail.

I've already tried setting group = mail in the /etc/xinetd.d/qpopper, but tried it again - no luck.

I went back and checked some more - and FINALLY - the /var/mail directory was set to root:root in the failing system. I changed it to root:mail as in the working system, and everything works now.

Evidently qpopper was picking up the gid from the /spool/mail directory and using it.

Thanks for pointing me in the right direction!

Jerry

To clarify, having permission setgid on the mail directory (g=rws) means that all files in the directory will be created with the same group, assuming the process has correct permissions. So qpopper doesn't have to do anything special.

@SteveG:

To clarify, having permission setgid on the mail directory (g=rws) means that all files in the directory will be created with the same group, assuming the process has correct permissions. So qpopper doesn't have to do anything special. qpopper still needs to have the ability to write in the directory which, in this case, means it has the "mail" group in it's current permission list.

QPopper calls setuid() to set the user to the person logging in, and setgid() to set the group to mail.

But it seems that it picks up the gid for mail from the /var/mail directory - which is why I had the wrong group when trying to create the file in /var/spool/pop.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct