[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pan-users] Re: {FILENAME} Re: Save attachment file permissions
From: |
Duncan |
Subject: |
[Pan-users] Re: {FILENAME} Re: Save attachment file permissions |
Date: |
Tue, 17 Feb 2009 17:28:47 +0000 (UTC) |
User-agent: |
Pan/0.133 (House of Butterflies) |
"Paul Crawford (at UoD)" <address@hidden>
posted address@hidden, excerpted below, on Tue, 17 Feb
2009 16:01:56 +0000:
>>
>> Resulting permissions on the executable:
>>
>> 0750 -rwxr-x---
>>
>> OK, the permissions honor umask (0027), but the executable bit is set
>> if allowed. Hmm...
>
> That agrees with what I saw, but I have umask = 022 hence chmod=755 in
> my case.
But where is your umask set, and would however you invoke pan get that
same umask or not? IOW, presumably you start pan from a desktop menu
entry (unless you're like me and have the menu entry actually start a
script that sets a few things before pan itself starts). Depending on
how you're setup, such desktop entries may not get the same umask and
environment as you will at a shell prompt. This is perhaps more likely
if you login to your desktop using a graphical dm such as xdm/kdm/gdm/
etc, than if you login in a text VT and issue startx or similar to start
your DE of choice, since the latter will be a direct child of your login
shell while the former bypasses it.
FWIW, I just changed my pan starter script to set the umask to 0137
before it starts pan, and test-saved that same attachment after
reinvoking pan with the new umask, and it honored it, with permissions
set 0640 on the same executable that was set 750 in my first test. So
pan DOES seem to honor umask (no matter WHAT the POSIX manual says about
uudecode's behavior, see my immediately previous post).
So regardless of whether it's pan or a library pan uses doing it, we know
know that (1) it's definitely pan as in-memory doing it, and (2), we now
have a workaround to prevent it -- set the umask appropriately before
starting pan.
DO note, however, that this WILL cause "interesting" behavior if pan
needs to create a directory, since for directories, the execute bit has a
different meaning. So don't go doing this and then telling pan to save
files into dirs that don't yet exist, 'cause it's not going to work. But
as long as the dirs already exist (or you create them using another
program before pan gets to that point) and pan is already setup and
configured so it's not trying to create new config dirs, you shouldn't
have a problem, and pan will work properly while honoring umask to cancel
execute bits on what it saves, if that's what you have pan's inherited
umask set to do.
--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
- [Pan-users] Save attachment file permissions, Paul Crawford, 2009/02/16
- Re: [Pan-users] Save attachment file permissions, Steven D'Aprano, 2009/02/16
- [Pan-users] Re: Save attachment file permissions, Duncan, 2009/02/17
- Re: {FILENAME} [Pan-users] Re: Save attachment file permissions, Paul Crawford (at UoD), 2009/02/17
- [Pan-users] Re: {FILENAME} Re: Save attachment file permissions,
Duncan <=
- Re: [Pan-users] Save attachment file permissions, Paul Crawford (at UoD), 2009/02/17
- [Pan-users] Re: Save attachment file permissions, Duncan, 2009/02/18
- Re: [Pan-users] Re: Save attachment file permissions, Paul Crawford (at UoD), 2009/02/18
- [Pan-users] Re: Save attachment file permissions, Duncan, 2009/02/18
- Re: [Pan-users] Re: Save attachment file permissions, Paul Crawford, 2009/02/19
- [Pan-users] Re: Save attachment file permissions, Duncan, 2009/02/19
- Re: [Pan-users] Re: Save attachment file permissions, Rhialto, 2009/02/19
- Re: [Pan-users] Re: Save attachment file permissions, Paul Crawford (at UoD), 2009/02/20
- [Pan-users] Re: Save attachment file permissions, walt, 2009/02/20
- [Pan-users] Re: Save attachment file permissions, Duncan, 2009/02/20