Bug 213316

Summary: nautilus ignores umask
Product: [Fedora] Fedora Reporter: Harald Jensås <hjensas>
Component: gnome-vfsAssignee: Alexander Larsson <alexl>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 6   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
URL: http://bugzilla.gnome.org/show_bug.cgi?id=327249
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-02-04 06:13:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 276041    
Attachments:
Description Flags
This is the patch posted on the bugzilla.gnome none

Description Harald Jensås 2006-10-31 19:36:40 UTC
Description of problem:

Files created with nautilus-2.16.0-5.fc6 does not get the correct permissions.
The global umask setting in /etc/bashrc is ignored.

Example:
---------------------------
$ ls -l
total 158
drwxrwsr-x   4 root   allusers  4096 Oct 31 18:42 shared-folder
$ cd shared-folder/
$ ls -l
total 0
-rw------- 1 harald allusers 0 Oct 31 18:40 create.empty.file.in.nautiilus
-rw-rw-r-- 1 harald allusers 1604 Oct 31 20:24 saved.with.gedit
-rw-rw-r-- 1 harald allusers 0 Oct 31 18:40 touched.file.in.bash
$ umask 
0002
---------------------------
With umask 002 all files should inherit the permissions of the parent folder.
And that is what happen when I create a file within a bash shell.
However, as you see in the example, when I create a file by <right click> -
<create document> - <empty file> it does not get the correct permissions. You
can also see that saving a file using gedit give the file the correct permissions.


Version-Release number of selected component (if applicable):
nautilus-2.16.0-5.fc6

How reproducible:

100 %

Steps to Reproduce:change the umask in /etc/bashrc to "umask=002" using vi.
1. create a folder $ mkdir /home/$user/test
2. change permission on test to $ chmod ug+rw test
3. create a file in /home/$user/test with touch, $ touch
/home/$user/test/file.created.with.touch
4. create a file using nautilus in /home/$user/test
5. run $ ls -l /home/$user/test
6. compare permissions of file.
  
Actual results:
$ ls -l
total 0
-rw------- 1 harald allusers 0 Oct 31 18:40 create.empty.file.in.nautiilus
-rw-rw-r-- 1 harald allusers 1604 Oct 31 20:24 saved.with.gedit
-rw-rw-r-- 1 harald allusers 0 Oct 31 18:40 touched.file.in.bash

Expected results:
-rw-rw-r-- 1 harald allusers 0 Oct 31 18:40 create.empty.file.in.nautiilus
-rw-rw-r-- 1 harald allusers 1604 Oct 31 20:24 saved.with.gedit
-rw-rw-r-- 1 harald allusers 0 Oct 31 18:40 touched.file.in.bash

Additional info:
This bug is described here:
http://bugzilla.gnome.org/show_bug.cgi?id=327249

A patch is already posted here: 
http://bugzilla.gnome.org/attachment.cgi?id=74009&action=view

Comment 1 Harald Jensås 2006-10-31 19:36:40 UTC
Created attachment 139892 [details]
This is the patch posted on the bugzilla.gnome

Comment 2 Alexander Larsson 2006-11-20 17:21:35 UTC
That patch is not really right, see my comment upstream.

Comment 3 Harald Jensås 2006-12-25 23:20:32 UTC
Alexabder, did you review the new patch posten on
http://bugzilla.gnome.org/show_bug.cgi?id=327249 ?

Comment 4 Alexander Larsson 2007-01-11 11:38:43 UTC
Commited upstream, will be in next 2.17.x release imported

Comment 5 Matthias Clasen 2008-02-04 06:13:17 UTC
Fixed a long time ago