HOW to set the UMASK?
Hello, My system is setup to use a UMASK=002 on my Maildir (procmail do the right thing) but if I read the messages with mut, they are after reading 0600 and can not more read fro another account. How can this solved? Thanks, Greetings and nice Day Michelle Konzack Systemadministrator 24V Electronic Engineer Tamay Dogan Network Debian GNU/Linux Consultant -- Linux-User #280138 with the Linux Counter, http://counter.li.org/ # Debian GNU/Linux Consultant # Michelle Konzack Apt. 917 ICQ #328449886 +49/177/935194750, rue de Soultz MSN LinuxMichi +33/6/61925193 67100 Strasbourg/France IRC #Debian (irc.icq.com) signature.pgp Description: Digital signature
Re: HOW to set the UMASK?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Saturday, May 10 at 01:13 AM, quoth Michelle Konzack: >Hello, > >My system is setup to use a UMASK=002 on my Maildir (procmail do the >right thing) but if I read the messages with mut, they are after reading >0600 and can not more read fro another account. > >How can this solved? Well, mutt attempts to preserve the umask of any mailbox that it reads. The only reason I can think of that it would get that wrong is if the stat() call on the mailbox failed. Try running mutt in debug mode and see if you get a line that says "stat failed on x" (where x is the name of the mailbox you're reading). ~Kyle - -- In all affairs it's a healthy thing now and then to hang a question mark on the things you have long taken for granted. -- Bertrand Russell -BEGIN PGP SIGNATURE- Comment: Thank you for using encryption! iEYEARECAAYFAkgppS8ACgkQBkIOoMqOI15i0gCfewb0DyXNVFH35aieZzPhw+YG us0AoMFpZ1BuFUxl5ymGIYWx/SXvYIef =KGAr -END PGP SIGNATURE-
Re: HOW to set the UMASK?
On Tue, May 13, 2008 at 09:26:55AM -0500, Kyle Wheeler wrote: > On Saturday, May 10 at 01:13 AM, quoth Michelle Konzack: > >Hello, > > > >My system is setup to use a UMASK=002 on my Maildir (procmail do the > >right thing) but if I read the messages with mut, they are after reading > >0600 and can not more read fro another account. > > > >How can this solved? > > Well, mutt attempts to preserve the umask of any mailbox that it > reads. The only reason I can think of that it would get that wrong is > if the stat() call on the mailbox failed. Try running mutt in debug > mode and see if you get a line that says "stat failed on x" (where > x is the name of the mailbox you're reading). I have a related problem, when I create files from mutt they are 600, I would lke them to be 644. My umask is 022. Is there anything I can do to have my new files 644? best regards keld
Re: HOW to set the UMASK?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Saturday, May 17 at 10:42 PM, quoth Keld Jørn Simonsen: > I have a related problem, when I create files from mutt they are > 600, I would lke them to be 644. My umask is 022. Is there anything > I can do to have my new files 644? Modify main.c. Mutt *ALWAYS* calls umask(077) before doing anything, so you'd need to either remove that call from the main.c or you'd need to modify it to suit your needs. ~Kyle - -- Mathematicians stand on each other's shoulders while computer scientists stand on each other's toes. -- R. W. Hamming -BEGIN PGP SIGNATURE- Comment: Thank you for using encryption! iEYEARECAAYFAkgwY6IACgkQBkIOoMqOI16Q1gCg7rETSCaOWsm/Hd8SND7zsCbN ERAAoOssQDL/ffqRJG1A8gn6e/lH0ydv =yvBh -END PGP SIGNATURE-
Re: HOW to set the UMASK?
On Sun, May 18, 2008 at 12:13:06PM -0500, Kyle Wheeler wrote: > On Saturday, May 17 at 10:42 PM, quoth Keld Jørn Simonsen: > > I have a related problem, when I create files from mutt they are > > 600, I would lke them to be 644. My umask is 022. Is there anything > > I can do to have my new files 644? > > Modify main.c. Mutt *ALWAYS* calls umask(077) before doing anything, > so you'd need to either remove that call from the main.c or you'd need > to modify it to suit your needs. I see. Would it be possible to add some command to .muttrc to override this? eg a umask command? That would be easier for me and others needing this functionality than recompiling the sources every time mutt is used on a new system. Or maybe a "set no_mutt_umask=yes" to just keep the umask of the environment. Best regards keld
Re: HOW to set the UMASK?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Sunday, May 18 at 07:34 PM, quoth Keld Jørn Simonsen: > On Sun, May 18, 2008 at 12:13:06PM -0500, Kyle Wheeler wrote: >> On Saturday, May 17 at 10:42 PM, quoth Keld Jørn Simonsen: >>> I have a related problem, when I create files from mutt they are >>> 600, I would lke them to be 644. My umask is 022. Is there anything >>> I can do to have my new files 644? >> >> Modify main.c. Mutt *ALWAYS* calls umask(077) before doing anything, >> so you'd need to either remove that call from the main.c or you'd need >> to modify it to suit your needs. > > I see. Would it be possible to add some command to .muttrc to override > this? eg a umask command? That would be easier for me and others needing > this functionality than recompiling the sources every time mutt is used > on a new system. > > Or maybe a "set no_mutt_umask=yes" to just keep the umask of the environment. Well, unfortunately, there is currently no such setting in standard mutt. The Debian folks have put together a patch to provide that functionality, and you can apply that to your mutt. Here's the relevant Debian bug report: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=426317 Here's a similar patch: http://bereshit.synflood.at/svn/mutt-patches/trunk/patches/ak.umask.diff If it's important to you, you should probably submit a bug at http://bugs.mutt.org ~Kyle - -- It is a tragic mix-up when the United States spends $500,000 for every enemy soldier killed, and only $53 annually on the victims of poverty. -- Reverend Martin Luther King, Jr. -BEGIN PGP SIGNATURE- Comment: Thank you for using encryption! iEYEARECAAYFAkgweYQACgkQBkIOoMqOI17xGQCfQ/CiSYGlSDoli826xYetdbuP Sj8AoNlavFqYsxi7l2pIYdAN2CqUfBOy =Umld -END PGP SIGNATURE-
Re: HOW to set the UMASK?
Helloy Kyle and Keld, Am 2008-05-18 19:34:31, schrieb Keld Jørn Simonsen: > I see. Would it be possible to add some command to .muttrc to override > this? eg a umask command? That would be easier for me and others needing > this functionality than recompiling the sources every time mutt is used > on a new system. I support this wish! > Or maybe a "set no_mutt_umask=yes" to just keep the umask of the environment. Why not set umask=default set umask=ignore set umask=XXX where "default" is the original behaviour of mutt, ignore use the system defaults and XXX is a manual set umask. The later can be important, if you access a maildir where the directories are partialy shared... Thanks, Greetings and nice Day Michelle Konzack Systemadministrator 24V Electronic Engineer Tamay Dogan Network Debian GNU/Linux Consultant -- Linux-User #280138 with the Linux Counter, http://counter.li.org/ # Debian GNU/Linux Consultant # Michelle Konzack Apt. 917 ICQ #328449886 +49/177/935194750, rue de Soultz MSN LinuxMichi +33/6/61925193 67100 Strasbourg/France IRC #Debian (irc.icq.com) signature.pgp Description: Digital signature
Re: HOW to set the UMASK?
On Sunday, 18 May 2008 at 19:34, Keld Jørn Simonsen wrote: > On Sun, May 18, 2008 at 12:13:06PM -0500, Kyle Wheeler wrote: > > On Saturday, May 17 at 10:42 PM, quoth Keld Jørn Simonsen: > > > I have a related problem, when I create files from mutt they are > > > 600, I would lke them to be 644. My umask is 022. Is there anything > > > I can do to have my new files 644? > > > > Modify main.c. Mutt *ALWAYS* calls umask(077) before doing anything, > > so you'd need to either remove that call from the main.c or you'd need > > to modify it to suit your needs. > > I see. Would it be possible to add some command to .muttrc to override > this? eg a umask command? That would be easier for me and others needing > this functionality than recompiling the sources every time mutt is used > on a new system. > > Or maybe a "set no_mutt_umask=yes" to just keep the umask of the environment. There was a (very) long discussion of this a year ago, including a patch. Rather than repeating history, let me point you to: http://lists.df7cb.de/mutt/message/20070303.051241.22a57515.en.html
Re: HOW to set the UMASK?
On Mon, May 19, 2008 at 09:45:35AM -0700, Brendan Cully wrote: > There was a (very) long discussion of this a year ago, including a patch. > Rather than repeating history, let me point you to: > > http://lists.df7cb.de/mutt/message/20070303.051241.22a57515.en.html If you dislike patching and recompiling mutt, you can use something along the lines of: macro attach S "find ~/savedir/ -perm 0600 -exec chmod g+r {} \\;" "Fix permissions in ~/savedir folder" Only works if you save all attachments in a certain folder. Change that folder and the permissions to suit your needs. I just hit shift+S after I save an attachment. Regards, Vincent van Leeuwen Media Design - http://www.mediadesign.nl/