Frerich Raabe
2013-Feb-07 10:22 UTC
[Dovecot] File permissions used for automatically created mailbox
Hi, I'm running Dovecot 2.1.12 on FreeBSD (quite successfully so, thanks for this nice piece of software!). One thing which is slightly annoying though is that automatically created mailboxes (I have lda_mailbox_autocreate set) don't have the file permissions I'd like them to have. I'm using a vmail-based system, i.e. all mail is owned by vmail:vmail; another member of the vmail group is called 'backup', which has read access to all mail in order to create backups. All mail is stored beneath /home/vmail, e.g. /home/vmail/frerich/Maildir Right now, newly created mailbox directories (e.g. /home/vmail/bob) have 0700 permissions, but I'd like to have 0750 for all directories and 0640 for all files so that all files and directories are group-readable for backup purposes. Does anybody know whether this is configurable somehow? Right now, my workaround consists running this cron script every night: #!/bin/sh chown -R vmail:vmail /home/vmail/ find /home/vmail/ -type d -print0 | xargs -0 chmod 0750 find /home/vmail/ -type f -print0 | xargs -0 chmod 0640 -- Frerich Raabe - raabe at froglogic.com www.froglogic.com - Multi-Platform GUI Testing
Steffen Kaiser
2013-Feb-07 11:34 UTC
[Dovecot] File permissions used for automatically created mailbox
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thu, 7 Feb 2013, Frerich Raabe wrote:> I'm running Dovecot 2.1.12 on FreeBSD (quite successfully so, thanks for this > nice piece of software!). One thing which is slightly annoying though is that > automatically created mailboxes (I have lda_mailbox_autocreate set) don't > have the file permissions I'd like them to have. > > Right now, newly created mailbox directories (e.g. /home/vmail/bob) have 0700 > permissions, but I'd like to have 0750 for all directories and 0640 for all > files so that all files and directories are group-readable for backup > purposes. > > Does anybody know whether this is configurable somehow?As far as I know and in my 2.1.14 it is like that: + the .XYZ directory inherits its permission to any new .XYZ.ABC mailbox (second level and down). + the Maildir/ directory inherits its permission to any new .XYZ mailbox (top level). + Files get the permission of the directory minus "x". This is true for "CREATE" command and Dovecot deliver. - -- Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQEVAwUBURORSF3r2wJMiz2NAQKCKwf+Oz98Fwub9G+QKwEJWIY5O5EtdFJlEIlH rzILIgsM9TRwuzdIFC+ZvAwY8EjOBd+EEWAnp2Ie3PEnP0mVloWUGFh6jyo1CYM3 lvROgjqXpo3++6+6KvHVCHUP21hK9nfJrYiGf5ESj0PMTlKPS4kBgdOhGnMQayM3 3Tn8RcpngzG0IG/ZNfW780uSAfmK0e7YOek5BumsRtt5J7cpozL2X6ce91ymOi4A fzyKTit+KLpwiglUj+68ZB39eX1SmHqrv8UeEXmxKCCjxoxHnk+pq/30MJd3a7lF xOLW8yJx6qFUbs0J3TymN+rSKTDkkaaNU3QM9rsQjy2W5XWYF+5FKg==ONer -----END PGP SIGNATURE-----