Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sat Nov 01, 2008 7:44 am 
Offline
Senior Newbie

Joined: Sat Nov 01, 2008 7:31 am
Posts: 8
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


Top
   
 Post subject:
PostPosted: Sat Nov 01, 2008 7:59 am 
Offline
Senior Member
User avatar

Joined: Tue Apr 13, 2004 6:54 pm
Posts: 833
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).

_________________
Rgds
Stephen
(Linux user since kernel version 0.11)


Top
   
PostPosted: Sat Nov 01, 2008 11:01 am 
Offline
Senior Newbie

Joined: Sat Nov 01, 2008 7:31 am
Posts: 8
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


Top
   
 Post subject:
PostPosted: Sat Nov 01, 2008 2:39 pm 
Offline
Senior Member

Joined: Sun Nov 30, 2003 2:28 pm
Posts: 245
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.

_________________
The irony is that Bill Gates claims to be making a stable operating system and Linus Torvalds claims to be trying to take over the world.
-- seen on the net


Top
   
 Post subject:
PostPosted: Sat Nov 01, 2008 3:12 pm 
Offline
Senior Member
User avatar

Joined: Tue Apr 13, 2004 6:54 pm
Posts: 833
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.

_________________
Rgds

Stephen

(Linux user since kernel version 0.11)


Top
   
 Post subject:
PostPosted: Sat Nov 01, 2008 3:50 pm 
Offline
Senior Newbie

Joined: Sat Nov 01, 2008 7:31 am
Posts: 8
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.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group