Re: localhost.domain

2015-06-14 Thread Ian Zimmerman
On 2015-06-14 20:19 -0700, Tom Fowle wrote:

> Hopefully have properly set localhost.domain
> Tom

Indeed, thanks!

-- 
Please *no* private copies of mailing list or newsgroup messages.
Rule 420: All persons more than eight miles high to leave the court.



Re: localhost.domain

2015-06-14 Thread Tom Fowle
Hopefully have properly set localhost.domain
Tom


Re: saving messages to files/permissions?

2015-06-14 Thread Tom Fowle
As so often happens, having changed nothing I know of,
I can now save messages to a file just fine
Have no idea what happened
Who ever said computers are consistant!

Re: localhost.localdomain
I know the host name, but not sure which domain name to usewill keep looking

Appologies for misdirected and duplicate replies to list and individuals,
had forgotten the L command is proper for this list.
Other lists it doesn't work

Thanks and sorry for the chaos.
Maybe my domain name is 
chaos.duh
tom fowle

On Sun, Jun 14, 2015 at 03:14:06AM -0400, Jon LaBadie wrote:
> On Sat, Jun 13, 2015 at 09:59:40PM -0700, Tom Fowle wrote:
> > Greetings all,
> > Not sure if this may be a debian problem but
> > 
> > I often save individual incomming emails in seperate files in my home
> > directory with the mutt "s" command.
> > 
> > In any session, the first time I save to a particular file it goes fine.
> > 
> > However if I try to save another message to the same file, I get
> > "Permission denied."
> > 
> > checking the permission of the file it is
> > -rw- --- ---
> > 
> > I can, of course open another console and chmod to correct this without
> > leaving mutt,
> > but I don't recall this problem with my previously installed old fedora.
> > 
> > It appears the default debian umask should be 622 not 600, but 
> > getumask
> > gets command not found.
> > 
> I second Ian's comments regarding check ownership and mutt user
> problems first.  But if you do look at umask two points.
> 
> I know of no "getumask", but the umask command itself will report
> the current setting.
> 
> Umask is the modes you do NOT want set on new files.  So the umask
> that created -rw--- is 066 (for ordinary files 077 would work
> too but directory creation would be different).
> -- 
> Jon H. LaBadie j...@jgcomp.com
>  11226 South Shore Rd.  (703) 787-0688 (H)
>  Reston, VA  20190  (703) 935-6720 (C)


Re: saving messages to files/permissions?

2015-06-14 Thread bastian-muttuser
On 13Jun15 22:55 -0700, Ian Zimmerman wrote:
> On 2015-06-13 21:59 -0700, Tom Fowle wrote:
> 
> Tom> I often save individual incomming emails in seperate files in my
> Tom> home directory with the mutt "s" command.  In any session, the
> Tom> first time I save to a particular file it goes fine.  However if I
> Tom> try to save another message to the same file, I get "Permission
> Tom> denied."
> 
> Tom> checking the permission of the file it is -rw- --- ---
> 
> Tom> I can, of course open another console and chmod to correct this
> Tom> without leaving mutt, but I don't recall this problem with my
> Tom> previously installed old fedora.
> 
> Wait, something is odd here.  Are you running mutt as a different user?
> If not, why would it have any trouble writing to a file with 0600
> permissions?  Those two bits are _user_ read and write, after all.
> 
> I think you should attack this angle before you try to change the
> permissions.

I think it is worth to solve the trouble of file permissions. FMPOV this
behaviour is not typical to unix philosophy, because you cannot
influence file modes via the umask syscall.

This behaviour also bothered me, even though I use just one UID
basically. See below for my reasons to work on it, if interested.

> strace may be your friend.

Code rules. In my current mutt (Mutt 1.5.23+89 (0255b37be491)
(2014-03-12)) I find two locations, where umask and mode bits are set
hard-coded, so no way to modify without re-compiling.

First, main.c:599
  
  umask (077);

  This could be set to 022, which also opens other permissions to other
  users. So you should know if you really want it.

Second, lib.c:645 and :657

  if ((fd = open (safe_file, flags, 0600)) < 0)

  Here again, when files are opened in a safe way when writing out
  attachements, file mode bits are set hard-coded :/

  Here you can set 0666 as mode bits. The open syscall also binary-ands
  (&) the bits from the umask setting, either set them globally to 022
  in main.c or - the way I'd propose - change umask before writing out
  attachements and then reset to the previous one.


Finally, here is my trouble with it. I got used to save attachments to
~/public_html/$somewhere to have them available remotely via browser. I
always had to chmod a+r manually to enable all users including the web
server process to read that files.

In addition, these hard-coded umask and file mode bit settings are in
the mutt source repositories (see version reference above), so I think
the same behaviour should be seen on fedora, but I don't about any
patches from their side.

Cheers,

-- 
Bastian


Re: saving messages to files/permissions?

2015-06-14 Thread Jon LaBadie
On Sat, Jun 13, 2015 at 09:59:40PM -0700, Tom Fowle wrote:
> Greetings all,
> Not sure if this may be a debian problem but
> 
> I often save individual incomming emails in seperate files in my home
> directory with the mutt "s" command.
> 
> In any session, the first time I save to a particular file it goes fine.
> 
> However if I try to save another message to the same file, I get
> "Permission denied."
> 
> checking the permission of the file it is
> -rw- --- ---
> 
> I can, of course open another console and chmod to correct this without
> leaving mutt,
> but I don't recall this problem with my previously installed old fedora.
> 
> It appears the default debian umask should be 622 not 600, but 
> getumask
> gets command not found.
> 
I second Ian's comments regarding check ownership and mutt user
problems first.  But if you do look at umask two points.

I know of no "getumask", but the umask command itself will report
the current setting.

Umask is the modes you do NOT want set on new files.  So the umask
that created -rw--- is 066 (for ordinary files 077 would work
too but directory creation would be different).
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)