Thunar dosen't allow write bit to be set on newly created files and dirs to groups and other. even with umask 0 set
Works perfectly. Maybe it's a restriction of the file system in use?
Created attachment 1709 Don't override user's preferred file/dir create mode I can reproduce this on Ubuntu 8.10 (Hardy). The issue is in thunar-vfs. I've written and attached a patch. See Launchpad bug 242842: https://bugs.launchpad.net/ubuntu/+source/thunar/+bug/242842
Just to clarify, I've reproduced and patched this in thunar 0.9.0-4ubuntu2 . The ubuntu package doesn't appear to apply any relevant patches.
As for filesystem: the test system is a bog standard Ubuntu install, with all ext3 filesystems. In any case, thunar-vfs code is clearly just not requesting group write or world write permissions, so they're not being granted even if they're not masked out by the user's umask. thunar-vfs should request group and world write and let the user's umask decide whether or not those should actually be granted.
I can reproduce this bug on my system. My global umask is 0002. When I create a file in Thunar, its permissions are 644 instead of 664. When I create a directory in Thunar, its permissions are 755 instead of 775. The same operations from command line give the correct result (664 for files and 775 for directories). My system is a Gentoo on x86. Thunar version is 0.9.0 (Gentoo ebuild 0.9.0-r2)
I can also reproduce this bug on my system, it is preventing me from creating an good shared file system when clients are using thunar... Could somebody please have a look at this? I can 100% reproduce the issue thunar: debian sid: pool/main/t/thunar/thunar_0.9.0-10_i386.deb Thanks in advance,
Created attachment 2212 File creation when umask is different from 022 fix
The patch giovanni attached (he sent it to me first) definitely fixes the issue here after some testing, umask is correctly honoured. I'm going to commit it to OpenBSD's portstree.
Thanks! I've committed Giovanni's patch in revision 29653: * thunar-vfs/thunar-vfs-io-jobs.c: Apply umask properly when creating files/directories. Patch by Giovanni Bechis (bug #3532
I think that the problem is not fixed. I have set the umask value (0002) in /etc/profile and in /etc/login.defs. Thunar still applies wrong permissions (0022). Gentoo x86 Xfce 4.6.1 Thunar 1.0.1
Yes, the bug is not fixed yet. The patch which I applied for Thunar 1.0.x even makes things worse. Reopening the bug.
*** Bug 5813 has been marked as a duplicate of this bug. ***
And fixed again, this time with Craig's patch. Here's the log: commit eb58c6a6ba7f77c2c16016db064524df598ef421 Author: Jannis Pohlmann <jannis@xfce.org> Date: Sat Oct 3 11:49:41 2009 +0200 Fix bugs #3532 (umask < 0022 not honoured) and #5813 properly (I hope). The previous patch applied in e53de71e6add9b28ba034111a1d19db7def8f7e7 made things worse than before: it used DEFFILEMODE which seems to be BSD-specific for creating files. It also reset the umask to 0 when creating the first directory with _thunar_vfs_io_jobs_mkdir(). What we really want is to use 0777 (dirs) and 0666 (files) and let the standard C system calls like open() apply the umask value. This should work on all POSIX-compliant systems. Patch provided by Craig Ringer <craig@postnewspapers.com.au>.
*** Bug 5376 has been marked as a duplicate of this bug. ***
*** Bug 6389 has been marked as a duplicate of this bug. ***