"Permission Denied" when archiving from /var/mail directory

Bug #120152 reported by João Gilberto Magalhães (JG)
8
Affects Status Importance Assigned to Milestone
archivemail (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: archivemail

Version 7.0.1-1 (Feisty)
Severity: Lowest

When a root user archive MBOX file in /var/mail causes a error: "Permission Denied" because archivemail changes the permission to the owner of INBOX and this user dont have permission to write in /var/mail directory.

I dont know if it is a behavior or not, but I am sending a PATCH for the Feisty version.

So I hope help somebody.

Revision history for this message
João Gilberto Magalhães (JG) (byjg) wrote :
description: updated
Revision history for this message
Miroslav Sabljić (civija) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Could you please indicate the steps to reproduce this issue? Thanks in advance.

Changed in archivemail:
status: New → In Progress
Revision history for this message
João Gilberto Magalhães (JG) (byjg) wrote :

When I use the ArchiveMail as a single user (not root) it works fine. I created a script for the ROOT user run several tasks to archive my old email. In this case the archivemail runs ok, but change the user permission and the mailbox's owner didn't access that file. I dont remember all details because I move my mails from mbox to maildir but that patch seems fix the problem.

Revision history for this message
Miroslav Sabljić (civija) wrote :

> When I use the ArchiveMail as a single user (not root) it works fine.
> I created a script for the ROOT user run several tasks to archive my
> old email. In this case the archivemail runs ok, but change the user
> permission and the mailbox's owner didn't access that file.

I'm sorry, but I don't follow this. Is your script changing permissions
or what? Could you explain more detailed? What is your script actually
doing?

> I dont remember all details because I move my mails from mbox to
> maildir but that patch seems fix the problem.

I'm sorry but if you don't give me more info I can reproduce this and
therefor can start working on it. This patch isn't adequate.

Revision history for this message
Miroslav Sabljić (civija) wrote : Re: "Permission Denied" when archiving from /var/maildirectory

> I'm sorry but if you don't give me more info I can reproduce this and
> therefor can start working on it. This patch isn't adequate.

Correction, this should say:
I'm sorry but if you don't give me more info I can't reproduce this and
therefor can't start working on it. This patch isn't adequate.

Changed in archivemail:
status: In Progress → Invalid
Revision history for this message
Tony (tahoward) wrote :

I'm seeing this too. Lets say I have a user called jeff. If I'm logged in as root, running archivemail -o /home/jeff/archive /var/mail/jeff fails with the permission denied error. The archivemail manpage says that when archivemail runs as root, the first thing it does is setuid to the owner of the mailbox it's operating on. If that' the case, then it explains the fail ure since jeff doesn't have permission to write to /var/mail, which is needed in order to create the mbox lock.

Changed in archivemail:
status: Invalid → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.