Linode Forum
https://forum.linode.com/

QPopper - Failed to create /var/spool/pop/.username.pop
https://forum.linode.com/viewtopic.php?f=11&t=3631
Page 1 of 1

Author:  jstuckle [ Sat Nov 01, 2008 7:44 am ]
Post subject:  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

Author:  sweh [ Sat Nov 01, 2008 7:59 am ]
Post subject: 

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).

Author:  jstuckle [ Sat Nov 01, 2008 11:01 am ]
Post subject:  Solved! QPopper - Failed to create /var/spool/pop/.username.

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

Author:  SteveG [ Sat Nov 01, 2008 2:39 pm ]
Post subject: 

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.

Author:  sweh [ Sat Nov 01, 2008 3:12 pm ]
Post subject: 

SteveG wrote:
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.

Author:  jstuckle [ Sat Nov 01, 2008 3:50 pm ]
Post subject: 

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.

Page 1 of 1 All times are UTC-04:00
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/