On Thu, Apr 3, 2014 at 8:02 AM, Eduardo Ramos
<edua...@freedominterface.org> wrote:
> Hi Jeffrey,
>
> Are you using selinux? Is it possíble that selinux is blocking your write?
> Look at /var/log/audit/audit.log.
Thanks Eduardo.

This is Debian 7.4, i686. No selinux, and no /var/log/audit/
directory. (There is one /var/log/auth.log).

Jeff

> On 04/03/2014 08:26 AM, Jeffrey Walton wrote:
>>
>> I've been suffering a permission problem in Postfix/Dovecot for a
>> couple of days now. The setup is using virtual domains and users, so
>> the path to user's `home` is `/var/mail/<domain>/<user>`; and the path
>> to `MailDir` is `/var/mail/<domain>/<user>/MailDir`
>>
>> The mail logs continue to show a *Permission Denied*:
>>
>>      Apr  3 05:44:16 debian-x2 postfix/virtual[5670]: D6DDD1780100:
>> to=<j...@deltoid.com>,
>>      relay=virtual, delay=0.15, delays=0.1/0.01/0/0.04, dsn=4.2.0,
>> status=deferred
>>      (maildir delivery failed: create maildir file
>>      /var/mail/deltoid.com/jeff/Maildir/tmp/1396518256.P5670.debian-x2:
>> Permission denied)
>>
>> Permissions are as follows:
>>
>>      # ls -l /var/mail/
>>      total 96
>>      drw-rws--- 4 vmail  vmail  4096 Apr  2 18:19 deltoid.com
>>      -rw-rw---- 1 nobody mail  80586 Apr  2 07:45 nobody
>>
>>      # ls -l /var/mail/deltoid.com/
>>      total 12
>>      drw-rws--- 3 vmail vmail 4096 Apr  3 04:47 jeff
>>      drw-rws--- 3 vmail vmail 4096 Apr  3 04:47 support
>>      -rw-rws--- 1 vmail vmail  122 Apr  2 03:33 users
>>
>>      # ls -l /var/mail/deltoid.com/jeff/
>>      total 4
>>      drw-rws--- 2 vmail vmail 4096 Apr  3 04:47 Maildir
>>
>> `vmail` is both a user and group, and its set to `id` 5000:
>>
>>      # id -u vmail
>>      5000
>>
>> `postfix` and `dovecot` are both in the `vmail` group:
>>
>>      # members vmail
>>      vmail postfix dovecot
>>
>> And Postfix's configuration is shown below.
>>
>> I have a little script that attempts to set the proper permission
>> bits, but its apparently wrong:
>>
>>      # Ensure permissions are set on directories
>>      chown -R vmail:vmail /var/mail/*.com
>>      chmod -R 0660 /var/mail/*.com
>>      chmod -R g+rwxs /var/mail/*.com
>>      # chown -R dovecot:dovecot /var/mail/*.com/users
>>
>> I got the `chmod -R g+rwxs` from SuperUser questions on setting
>> directory permissions and having subdirectories and files inherit
>> those permissions (for example,
>>
>> http://superuser.com/questions/264383/set-file-permissions-so-that-new-files-inherit-same-permissions,
>>
>> http://stackoverflow.com/questions/580584/setting-default-permissions-for-newly-created-files-and-sub-directories-under-a,
>> and
>> http://superuser.com/questions/151911/how-to-make-new-file-permission-inherit-from-the-parent-directory).
>>
>> Two questions:
>>
>>     1. What is wrong with the current permissions?
>>
>>     2. What are the permissions supposed to be?
>>
>> My apologies for the basic question. Many of the blog posts, tutorials
>> and Mini-HowTos are just not working as advertised.
>>
>> Thanks in advance.

Reply via email to