"Paul Crawford (at UoD)" <p...@sat.dundee.ac.uk> posted 499adf74.2070...@sat.dundee.ac.uk, 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 mailing list Pan-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/pan-users