Loading ...
Sorry, an error occurred while loading the content.

Maildir permissions issue.

Expand Messages
  • Warren H. Prince
    In an attempt to allow rsync to backup email to another server in another location, I seem to have messed something up, but I ll be darned if I can find it....
    Message 1 of 2 , Aug 27, 2012
    • 0 Attachment
      In an attempt to allow rsync to backup email to another server in another location, I seem to have messed something up, but I'll be darned if I can find it.... I'd really appreciate any help. The user is attymatter. Attymatter's home is /attymatter/home/attymatter :

      attymatter:x:1000:1000::/attymatter/home/attymatter:/bin/sh (from /etc/passwd)

      The error is:

      warning: maildir access problem for UID/GID=1000/1000: create maildir file /attymatter/home/attymatter/Maildir/tmp/1346111764.P8226.ip-10-86-18-6: Permission denied
      Aug 27 23:56:04postfix/local[8226]: warning: perhaps you need to create the maildirs in advance
      Aug 27 23:56:04postfix/local[8226]: 121C8B429D: to=<attymatter@...>, orig_to=<10711@...>, relay=local, delay=0.26, delays=0.24/0.01/0/0.01, dsn=5.2.0, status=bounced (maildir delivery failed: create maildir file /attymatter/home/attymatter/Maildir/tmp/1346111764.P8226.ip-10-86-18-6: Permission denied)

      and

      dovecot: chdir(/attymatter/home/attymatter) failed with uid 1000: Permission denied

      user with UID 1000 is attymatter

      [root]# su attymatter
      sh-4.1$ id
      uid=1000(attymatter) gid=1000(attymatter) groups=1000(attymatter)

      Stat for /attymatter/home/attymatter/Maildir/tmp:

      [root@ip-10-86-18-6 attymatter]# su attymatter
      sh-4.1$ stat /attymatter/home/attymatter/Maildir/tmp/
      File: `/attymatter/home/attymatter/Maildir/tmp/'
      Size: 6 Blocks: 0 IO Block: 4096 directory
      Device: ca80h/51840d Inode: 577803008 Links: 2
      Access: (0770/drwxrwx---) Uid: ( 1000/attymatter) Gid: ( 505/ editors)
      Access: 2012-08-27 09:30:00.629979113 +0000
      Modify: 2012-08-28 00:27:14.672084869 +0000
      Change: 2012-08-28 00:27:14.672084869 +0000

      I can create a file there:

      sh-4.1$ touch /attymatter/home/attymatter/Maildir/tmp/test

      sh-4.1$ cd /attymatter/home/attymatter/Maildir/tmp/
      sh-4.1$ ls -lah
      total 4.0K
      drwxrwx--- 2 attymatter editors 17 Aug 28 00:29 .
      drwxrwx--- 16 attymatter editors 4.0K Aug 27 12:30 ..
      -rw-rw-r-- 1 attymatter attymatter 0 Aug 28 00:29 test

      main.cnf:

      alias_database = hash:/etc/aliases
      alias_maps = hash:/etc/aliases
      append_dot_mydomain = no
      biff = no
      command_directory = /usr/sbin
      config_directory = /etc/postfix
      daemon_directory = /usr/libexec/postfix
      data_directory = /var/lib/postfix
      debug_peer_level = 5
      debug_peer_list = attymatter.com, princelaw.com, unconundrum.com
      home_mailbox = Maildir/
      html_directory = no
      inet_interfaces = all
      mail_owner = postfix
      mailbox_size_limit = 0
      mailq_path = /usr/bin/mailq
      manpage_directory = /usr/local/man
      message_size_limit = 0
      mydestination = domU-12-31-38-01-61-61.compute-1.internal/, localhost.compute-1.internal, localhost, $myhostname, $mydomain
      myhostname = aws2.unconundrum.com
      mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
      newaliases_path = /usr/bin/newaliases
      queue_directory = /var/spool/postfix
      readme_directory = no
      recipient_delimiter = +
      relayhost = mail.princelaw.com
      sample_directory = /etc/postfix
      sendmail_path = /usr/sbin/sendmail
      setgid_group = postdrop
      smtp_connect_timeout = 240s
      smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
      smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
      smtpd_tls_ask_ccert = yes
      smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
      smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
      smtpd_tls_security_level = may
      smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
      virtual_mailbox_domains = /etc/postfix/virtual_mailbox_domains

      Thanks again in advance
    • Warren H. Prince
      ... I found the issue. The root of the path was not owned by the user account.... not sure how this worked in the past, and I couldn t change the owner of
      Message 2 of 2 , Aug 27, 2012
      • 0 Attachment
        On Aug 27, 2012, at 8:36 PM, "Warren H. Prince" <wprince@...> wrote:

        > In an attempt to allow rsync to backup email to another server in another location, I seem to have messed something up, but I'll be darned if I can find it.... I'd really appreciate any help. The user is attymatter. Attymatter's home is /attymatter/home/attymatter :

        I found the issue. The root of the path was not owned by the user account.... not sure how this worked in the past, and I couldn't change the owner of the root, so I move the Maildir to the normal home directory and all is well...
      Your message has been successfully submitted and would be delivered to recipients shortly.