Michael: That test is invalid, and shows nothing. You've misunderstood
how the umask works.

In a UNIX system, things like environment variables, ulimit settings and
the umask are inherited from the parent process during process creation.

Your test has a process tree like this:

Thunar
    terminal
        bash

and you're changing the umask in the 'bash' process that you then
terminate by closing the terminal. Nothing else has changed.
(Technically the terminal process is probably a peer of Thunar rather
than a child, despite having been created by Thunar, because Thunar
detaches from it to avoid killing it if Thunar dies or is restarted -
but that doesn't really matter for the purposes of this discussion).

Additionally, you're trying to test by setting the umask then checking
it again later. This fails to detect the case where Thunar isn't
changing the umask, but rather overriding it in individual mkdir(...)
etc system calls. Which is what it was doing, by the way, before this
bug was fixed - it wasn't setting the umask, but rather was ignoring it
and specifying its own mask for file and directory operations.

A valid test would be to launch a terminal, kill Thunar, set your umask,
then re-launch Thunar from within that terminal session, then create a
directory using that Thunar process and see if it's permissions (shown
using 'ls -l') are appropriate for the umask you set.

Better, set your umask globally using PAM options, /etc/profile, or
(preferably) a new file in /etc/X11/XSession.d for the purpose. Be aware
that if you set your umask in /etc/profile or by PAM it might get
overridden by your X session startup scripts in some distros. That's
*NOT* to do with Thunar.

** Changed in: thunar (Ubuntu)
       Status: Confirmed => Fix Released

** Changed in: thunar (Ubuntu)
       Status: Fix Released => Fix Committed

-- 
Thunar overrides the user's umask
https://bugs.launchpad.net/bugs/242842
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to