umask/permissions on new files created via notmuch-insert(1) ?

classic Classic list List threaded Threaded
3 messages Options
Daniel Kahn Gillmor Daniel Kahn Gillmor
Reply | Threaded
Open this post in threaded view
|

umask/permissions on new files created via notmuch-insert(1) ?

during some maintenance work today, bremner and i noticed that message
delivery via "notmuch insert" creates files that are stricter than the
umask.

using notmuch 0.23.6, with umask 027, "notmuch insert" created files
with mode 0600.  i would have expected 0640.

using strace, i don't see notmuch invoking any system calls to umask()
or chmod() so i'm not sure how these permissions are getting set in the
first place.

is there a reason that "notmuch insert" should be stricter than the
umask?  does this ring any bells for people?

        --dkg

_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch

signature.asc (847 bytes) Download Attachment
Gaute Hope Gaute Hope
Reply | Threaded
Open this post in threaded view
|

Re: umask/permissions on new files created via notmuch-insert(1) ?

Daniel Kahn Gillmor writes on februar 4, 2018 20:25:
> is there a reason that "notmuch insert" should be stricter than the
> umask?  does this ring any bells for people?

Are you asking why it is or why it should? If former; maybe because of
line 230 in notmuch-insert.c ?

Regards, Gaute


_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch

attachment0 (849 bytes) Download Attachment
Daniel Kahn Gillmor Daniel Kahn Gillmor
Reply | Threaded
Open this post in threaded view
|

Re: umask/permissions on new files created via notmuch-insert(1) ?

On Sun 2018-02-04 20:34:09 +0100, Gaute Hope wrote:
> Daniel Kahn Gillmor writes on februar 4, 2018 20:25:
>> is there a reason that "notmuch insert" should be stricter than the
>> umask?  does this ring any bells for people?
>
> Are you asking why it is or why it should? If former; maybe because of
> line 230 in notmuch-insert.c ?

yep, that's definitely the cause of it, but looking through the git
history, it seems to have no clear justification.

do other LDA programs behave this way?  is there a reason to not 0666 or
0644 ?  seems like the umask is where people should be making these
choices, and mail being delivered doesn't necessarily need this kind of
lockdown.

we're running into this when looking at a mailing list archiver -- i
want messages to be delivered via "notmuch insert" as the mailbox owner.
but the mailbox viewer is going to be a different user, and they need
read-only access to the archive.  instead, they're completely locked
out.

am i missing something?

        --dkg

_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch

signature.asc (847 bytes) Download Attachment