[Thunar-dev] how to make thunar use umask 0007

Alexander Iliev sasoiliev at mamul.org
Fri Sep 26 21:58:17 CEST 2008


Jelle de Jong wrote:
> Peter Kuma wrote:
>> Jelle de Jong wrote:
>>> Hello everybody, I got a big issue on a multi use system that uses
>>> thunar as file manager.
>>>
>>> The system and user umasks are set to 007 but when i create files and
>>> folders with thunar it does not correspond to the given umask. Can
>>> somebody duplicate this behavior and why is this and how can we fix this?
>>>
>>> Kind regards,
>>>
>>> Jelle
>>>
>>> $ umask
>>> 0007
>>> $ thunar -v
>>> Thunar 0.9.0 (Xfce 4.4.2)
>>>
>> I had the same problem. This fixed it:
>>
>> --- thunar-vfs/thunar-vfs-io-jobs.c	(revision 27037)
>> +++ thunar-vfs/thunar-vfs-io-jobs.c	(working copy)
>> @@ -433,7 +433,7 @@
>>
>>   again:
>>         /* try to create the file at the given path */
>> -      fd = g_open (absolute_path, O_CREAT | O_EXCL | O_WRONLY, 0644);
>> +      fd = g_open (absolute_path, O_CREAT | O_EXCL | O_WRONLY, 0666);
>>         if (G_UNLIKELY (fd < 0))
>>           {
>>             /* check if the file already exists */
>> @@ -708,7 +708,7 @@
>>         _thunar_vfs_job_process_path (job, lp);
>>
>>         /* try to create the target directory */
>> -      if (!_thunar_vfs_io_ops_mkdir (lp->data, 0755, 
>> THUNAR_VFS_IO_OPS_NONE, error))
>> +      if (!_thunar_vfs_io_ops_mkdir (lp->data, 0777, 
>> THUNAR_VFS_IO_OPS_NONE, error))
>>           return FALSE;
>>       }
>>
>>
>> Peter Kuma
>>
> 
> Thanks for providing this info, I now have seen several reports a
> similar issue. Did you report this patch somewhere, and do you know if
> there is a solution in the upstream svn?

I've noticed the same problem here, checked the svn, the code still
uses umask 0644 for file and 0755 for directory creation.

A patch was uploaded by Craig Ringer in bugzilla (bug #3532) on June
25 this year, but didn't make it in svn.

I'd like to ask - is there someone on this list who can take the
responsibility to commit the patch or give a reason why it should not
be commited, as I need this funtionality as well.

Thanks,
--
Alexander Iliev



More information about the Thunar-dev mailing list