GNOME Bugzilla – Bug 111571
gedit: Save-As creates files with primary group regardless of directory permissions
Last modified: 2006-12-24 10:46:56 UTC
Package: gedit Version: 2.0.2 Severity: normal >Originator: Alexander JOLK >Organization: net >Synopsis: Save-As creates files with primary group regardless of directory permissions >Class: sw-bug >Gnome-Libs-Release: gnome-libs-1.4.1.2 >Environment: <machine, os, libc version, target, libraries (multiple lines)> System: Linux caro.buf.fr 2.4.18-24.8.0 #1 Fri Jan 31 06:51:30 EST 2003 i686 i686 i386 GNU/Linux Architecture: i686 Distribution: Red Hat Version: Red Hat Linux release 8.0 (Psyche) >Description: In a directory with permissions g+s, belonging to a group that I am a secondary member of, when I do a Save-As in order to create a new file, it is created with my primary group id. When I edit a new file and let gedit create it though, it is correctly created with the directory's group id. >How-To-Repeat: id > uid=num(login) gid=num(primary) groups=num(primary),num(secondary) mkdir testdir chgrp secondary testdir chmod g+s testdir cd testdir gedit new-file (enter some text, and Save: the file gets group secondary) (make Save-As, enter new name, the file gets group primary) >Fix: -- Alexander Jolk / BUF Compagnie tel +33-1 42 68 18 28 / fax +33-1 42 68 18 29 ------- Bug moved to this database by unknown@bugzilla.gnome.org 2003-04-25 09:46 ------- The original reporter (alexj@buf.com) of this bug does not have an account here. Reassigning to the exporter, unknown@bugzilla.gnome.org. Reassigning to the default owner of the component, maggi@athena.polito.it.
Setting version->2.0.2, leaving priority & severity at normal, adding the GNOMEVER2.0 and bugsquad keywords, and marking as new.
This was fixed more than 1 year ago, when we rewrote the file saving code. I just tried the above testcase and I get exactly the same permissions on both files: mkdir testdir groups > paolo ... antonio chgrp antonio testdir chmod g+s testdir cd testdir gedit foo1.txt, save, save as foo2.txt ls -l: -rw-r--r-- 1 paolo antonio 5 Dec 24 11:41 foo1.txt -rw-r--r-- 1 paolo antonio 5 Dec 24 11:41 foo2.txt