Permission of data/bounce-events-?????.pck
![](https://secure.gravatar.com/avatar/31db9fb05feb01c319e302be79bc9228.jpg?s=120&d=mm&r=g)
Dear all,
I was checking my system for world-writable files, and found lots of
data/bounce-events-?????.pck that are world-writable:
imacat@rinse ~ % ls -lt /var/lib/mailman/data | grep 'rw. ' -rw-rw-rw- 1 list list 0 2006-01-31 01:26 bounce-events-02258.pck -rw-rw-rw- 1 list list 4786 2005-12-26 17:36 bounce-events-26086.pck ... imacat@rinse ~ %
I searched the archive and know that they can be safely deleted.
But, is that "world-writable" intended? I'm a little worry about it.
-- Best regards, imacat ^_*' <imacat@mail.imacat.idv.tw> PGP Key: http://www.imacat.idv.tw/me/pgpkey.txt
<<Woman's Voice>> News: http://www.wov.idv.tw/ Tavern IMACAT's: http://www.imacat.idv.tw/ TLUG List Manager: http://lists.linux.org.tw/cgi-bin/mailman/listinfo/tlug
![](https://secure.gravatar.com/avatar/746f7519ba02fb0d815e59f305c53fa2.jpg?s=120&d=mm&r=g)
imacat wrote:
Under normal circumstances, the lifetime of this file is at most REGISTER_BOUNCES_EVERY (default = 15 minutes). The old orphaned ones will never be read by Mailman, so the exposure isn't too great. The reading of the file is protected in a try, so I think the worst that might happen if it got clobbered is that you'd lose a few bounce events.
But to answer your question, what's the default umask on your system? I think that's what controls this.
-- Mark Sapiro <msapiro@value.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/561fa7ba9dad989eb67ea4d34177b3df.jpg?s=120&d=mm&r=g)
Mark Sapiro wrote:
Hi,
How I make to erase these archives? I can do it? I have archives since Novembro/2005. Thanks a lot, Clóvis
-- Clovis Tristao - UNICAMP/Faculdade de Engenharia Agricola Administrador de Redes - Secao de Informatica (SINFO) E-mail: mailto:clovis@agr.unicamp.br http://www.agr.unicamp.br Fone(0xx19) 37881031-37881038 ou FAX(55xx19) 37881005/37881010
![](https://secure.gravatar.com/avatar/746f7519ba02fb0d815e59f305c53fa2.jpg?s=120&d=mm&r=g)
Clovis Tristao wrote:
How I make to erase these archives? I can do it? I have archives since Novembro/2005.
First - please don't hijack existing threads for unrelated posts. It makes the archives difficult to read. Post a new message rather than a reply.
If you don't want list archives at all, you can safely set archive to No on your lists Archiving Options page and then delete the archives/private/listname/ and archives/private/listname.mbox/ directories, and if your archives were public, also delete the archives/public/listname/ and archives/public/listname.mbox/ directories.
If you want to keep only recent archives, say from the last month or two, you can delete the unwanted stuff from the archives/private/listname/ directory, but there will still be old entries in the index.
A better method would be to delete old posts from the archives/private/listname.mbox/listname.mbox file and rebuild the archives as described at <http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq03.003.htp>.
Note that if you delete old posts from the archives/private/listname.mbox/listname.mbox file and rebuild the archives, the URLs of remaining archived messages will change. This is only a problem if one post refers to another by URL or if someone saves the URL for later. This is probably not important to you if you are only archiving the last month or two.
-- Mark Sapiro <msapiro@value.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/561fa7ba9dad989eb67ea4d34177b3df.jpg?s=120&d=mm&r=g)
Hi,
Mark Sapiro wrote:
Sorry
Thanks a lot, Clóvis
-- Clovis Tristao - UNICAMP/Faculdade de Engenharia Agricola Administrador de Redes - Secao de Informatica (SINFO) E-mail: mailto:clovis@agr.unicamp.br http://www.agr.unicamp.br Fone(0xx19) 37881031-37881038 ou FAX(55xx19) 37881005/37881010
![](https://secure.gravatar.com/avatar/31db9fb05feb01c319e302be79bc9228.jpg?s=120&d=mm&r=g)
On Tue, 31 Jan 2006 14:17:42 -0800 Mark Sapiro <msapiro@value.net> wrote:
Frankly, I got a different test result.
I put a line "touch /var/tmp/mailman.umask.test" to
/etc/init.d/mailman (which is copied from scripts/mailman) and reboot my system. Here is what I got:
imacat@rinse ~ % ls -l /var/tmp/mailman.umask.test -rw-r--r-- 1 root root 0 2006-02-02 02:41 /var/tmp/mailman.umask.test imacat@rinse ~ % ls -l /var/lib/mailman/data/bounce-events-*.pck -rw-rw-rw- 1 list list 0 2006-02-02 02:41 /var/lib/mailman/data/bounce-events-02211.pck imacat@rinse ~ %
Appreantly the umask when running /etc/init.d/mailman is 0022 but
mailman still create data/bounce-events-?????.pck as 0666. Or the python (mailmanctl) uses a different "system default umask", other than its parent process /etc/init.d/mailman?
I noted that in the source of mailman 2.1.7 there are 2 lines in
bin/mailmanctl:
line 421-422 # Clear our file mode creation umask os.umask(0)
Is this intended? Is it the reason why data/bounce-events-?????.pck
are world-writable?
-- Best regards, imacat ^_*' <imacat@mail.imacat.idv.tw> PGP Key: http://www.imacat.idv.tw/me/pgpkey.txt
<<Woman's Voice>> News: http://www.wov.idv.tw/ Tavern IMACAT's: http://www.imacat.idv.tw/ TLUG List Manager: http://lists.linux.org.tw/cgi-bin/mailman/listinfo/tlug
![](https://secure.gravatar.com/avatar/746f7519ba02fb0d815e59f305c53fa2.jpg?s=120&d=mm&r=g)
imacat wrote:
It looks like you're right. I don't know if there is/was a good reason or not. I'm cross posting this reply to Mailman-Developers. Maybe someone there knows the reason for this.
Note that many places in the Mailman code, umask is saved and set for a particular purpose and then restored, but BounceRunner doesn't do this when creating the bounce-events-*.pck. I don't know why.
-- Mark Sapiro <msapiro@value.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/746f7519ba02fb0d815e59f305c53fa2.jpg?s=120&d=mm&r=g)
imacat wrote:
There doesn't appear to be a good reason. This has been changed for Mailman 2.1.8 so that the 'default' umask will be 007 and also the specific creation of the bounce-events queue file will have no permission for 'other'.
The changes to bin/mailmanctl and Mailman/Queue/BounceRunner.py have been committed to CVS and can be seen (soon) at <http://cvs.sourceforge.net/viewcvs.py/mailman/mailman/>.
-- Mark Sapiro <msapiro@value.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/746f7519ba02fb0d815e59f305c53fa2.jpg?s=120&d=mm&r=g)
imacat wrote:
Under normal circumstances, the lifetime of this file is at most REGISTER_BOUNCES_EVERY (default = 15 minutes). The old orphaned ones will never be read by Mailman, so the exposure isn't too great. The reading of the file is protected in a try, so I think the worst that might happen if it got clobbered is that you'd lose a few bounce events.
But to answer your question, what's the default umask on your system? I think that's what controls this.
-- Mark Sapiro <msapiro@value.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/561fa7ba9dad989eb67ea4d34177b3df.jpg?s=120&d=mm&r=g)
Mark Sapiro wrote:
Hi,
How I make to erase these archives? I can do it? I have archives since Novembro/2005. Thanks a lot, Clóvis
-- Clovis Tristao - UNICAMP/Faculdade de Engenharia Agricola Administrador de Redes - Secao de Informatica (SINFO) E-mail: mailto:clovis@agr.unicamp.br http://www.agr.unicamp.br Fone(0xx19) 37881031-37881038 ou FAX(55xx19) 37881005/37881010
![](https://secure.gravatar.com/avatar/746f7519ba02fb0d815e59f305c53fa2.jpg?s=120&d=mm&r=g)
Clovis Tristao wrote:
How I make to erase these archives? I can do it? I have archives since Novembro/2005.
First - please don't hijack existing threads for unrelated posts. It makes the archives difficult to read. Post a new message rather than a reply.
If you don't want list archives at all, you can safely set archive to No on your lists Archiving Options page and then delete the archives/private/listname/ and archives/private/listname.mbox/ directories, and if your archives were public, also delete the archives/public/listname/ and archives/public/listname.mbox/ directories.
If you want to keep only recent archives, say from the last month or two, you can delete the unwanted stuff from the archives/private/listname/ directory, but there will still be old entries in the index.
A better method would be to delete old posts from the archives/private/listname.mbox/listname.mbox file and rebuild the archives as described at <http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq03.003.htp>.
Note that if you delete old posts from the archives/private/listname.mbox/listname.mbox file and rebuild the archives, the URLs of remaining archived messages will change. This is only a problem if one post refers to another by URL or if someone saves the URL for later. This is probably not important to you if you are only archiving the last month or two.
-- Mark Sapiro <msapiro@value.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/561fa7ba9dad989eb67ea4d34177b3df.jpg?s=120&d=mm&r=g)
Hi,
Mark Sapiro wrote:
Sorry
Thanks a lot, Clóvis
-- Clovis Tristao - UNICAMP/Faculdade de Engenharia Agricola Administrador de Redes - Secao de Informatica (SINFO) E-mail: mailto:clovis@agr.unicamp.br http://www.agr.unicamp.br Fone(0xx19) 37881031-37881038 ou FAX(55xx19) 37881005/37881010
![](https://secure.gravatar.com/avatar/31db9fb05feb01c319e302be79bc9228.jpg?s=120&d=mm&r=g)
On Tue, 31 Jan 2006 14:17:42 -0800 Mark Sapiro <msapiro@value.net> wrote:
Frankly, I got a different test result.
I put a line "touch /var/tmp/mailman.umask.test" to
/etc/init.d/mailman (which is copied from scripts/mailman) and reboot my system. Here is what I got:
imacat@rinse ~ % ls -l /var/tmp/mailman.umask.test -rw-r--r-- 1 root root 0 2006-02-02 02:41 /var/tmp/mailman.umask.test imacat@rinse ~ % ls -l /var/lib/mailman/data/bounce-events-*.pck -rw-rw-rw- 1 list list 0 2006-02-02 02:41 /var/lib/mailman/data/bounce-events-02211.pck imacat@rinse ~ %
Appreantly the umask when running /etc/init.d/mailman is 0022 but
mailman still create data/bounce-events-?????.pck as 0666. Or the python (mailmanctl) uses a different "system default umask", other than its parent process /etc/init.d/mailman?
I noted that in the source of mailman 2.1.7 there are 2 lines in
bin/mailmanctl:
line 421-422 # Clear our file mode creation umask os.umask(0)
Is this intended? Is it the reason why data/bounce-events-?????.pck
are world-writable?
-- Best regards, imacat ^_*' <imacat@mail.imacat.idv.tw> PGP Key: http://www.imacat.idv.tw/me/pgpkey.txt
<<Woman's Voice>> News: http://www.wov.idv.tw/ Tavern IMACAT's: http://www.imacat.idv.tw/ TLUG List Manager: http://lists.linux.org.tw/cgi-bin/mailman/listinfo/tlug
![](https://secure.gravatar.com/avatar/746f7519ba02fb0d815e59f305c53fa2.jpg?s=120&d=mm&r=g)
imacat wrote:
It looks like you're right. I don't know if there is/was a good reason or not. I'm cross posting this reply to Mailman-Developers. Maybe someone there knows the reason for this.
Note that many places in the Mailman code, umask is saved and set for a particular purpose and then restored, but BounceRunner doesn't do this when creating the bounce-events-*.pck. I don't know why.
-- Mark Sapiro <msapiro@value.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/746f7519ba02fb0d815e59f305c53fa2.jpg?s=120&d=mm&r=g)
imacat wrote:
There doesn't appear to be a good reason. This has been changed for Mailman 2.1.8 so that the 'default' umask will be 007 and also the specific creation of the bounce-events queue file will have no permission for 'other'.
The changes to bin/mailmanctl and Mailman/Queue/BounceRunner.py have been committed to CVS and can be seen (soon) at <http://cvs.sourceforge.net/viewcvs.py/mailman/mailman/>.
-- Mark Sapiro <msapiro@value.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (3)
-
Clovis Tristao
-
imacat
-
Mark Sapiro