! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
No write access to group writable directories
Status:
CLOSED: FIXED
Product:
Thunar-vfs
Component:
General

Comments

Description Stefan Rehm 2006-04-16 17:17:26 CEST
Thunar does not seem to recognize, which groups a user belongs to. If I create a directory, thats owned by "root:users" (mode 775), it wont allow any write actions like creating/deleting files/directories in it, allthough my regular user belongs to group "users". This is always reproducable, regardless of the underlying file system (tried ext2/3 and a fat32 partition mounted with umask=002).
Comment 1 Benedikt Meurer editbugs 2006-04-20 15:12:34 CEST
Works fine here. Does the properties dialog display the "Read&Write" status for group access?
Comment 2 Michal Kurgan 2006-04-21 02:25:46 CEST
I have same issue.
I use "root:storage" (to get write access for selected users) but in thunar no write access if user is in storage group.
ls entry -> "drwxrwxr-x  11 root storage  256 Mar 31 14:04 storage"
In Properties Dialog, Permissions Tab all informations is disabled (grayed out), and there is no group entry, combo box is empty.

As i made some tests it occurs that issue may be connected with inital and suplement groups. Users with initial group have access visible (cut, remove, rename aren't greyed out and group name is visible in Permissions Tab), but if you have certain write access by supplementary group then these fields are greyed out in thunar.


Comment 3 Stefan Rehm 2006-04-21 17:42:12 CEST
Yes the properties dialog displays "Read&Write" for group access, but the group field is empty, just as Michal described.
I cannot confirm that the problem has something to do with the initial group, because "users" is the initial group of my regular user.
Comment 4 Benedikt Meurer editbugs 2006-04-23 16:14:20 CEST
Created attachment 521 
Suggested patch

Please try this patch.
Comment 5 Stefan Rehm 2006-04-23 19:31:10 CEST
Created attachment 522 
Effective User Patch 1
Comment 6 Stefan Rehm 2006-04-23 19:31:41 CEST
Created attachment 523 
Effective User Patch 2
Comment 7 Stefan Rehm 2006-04-23 19:35:45 CEST
No your patch didnt work.
But after finally having some time to do some further investigations, I think i found the bug.
In thunar/thunar-file.c in thunar_file_denies_access_permission the group permissions were checked against the file owners groups, not against the one who currently runs Thunar.
The two patches I attached correct this. I dont know if its the prettiest solution, but it works for me ;-).
Comment 8 Benedikt Meurer editbugs 2006-04-23 20:30:40 CEST
Yep, makes sense. Going to fix that.
Comment 9 Benedikt Meurer editbugs 2006-04-23 21:17:26 CEST
Created attachment 524 
Next try

Please try this patch.
Comment 10 Stefan Rehm 2006-04-23 22:09:11 CEST
Works perfectly now!
Comment 11 Benedikt Meurer editbugs 2006-04-24 13:20:23 CEST
Committed with revision 21204.

2006-04-24	Benedikt Meurer <benny@xfce.org>

	* thunar-vfs/thunar-vfs-types.h, thunar-vfs/thunar-vfs-info.c,
	  thunar/thunar-file.{c,h}: Determine the real access permissions
	  for files and add them as flags to the ThunarVfsInfo, instead of
	  guessing them from the mode and the uid/gid. Bug #1670.

Bug #1670

Reported by:
Stefan Rehm
Reported on: 2006-04-16
Last modified on: 2010-11-07

People

Assignee:
Jannis Pohlmann
CC List:
2 users

Version

Version:
unspecified

Attachments

Suggested patch (938 bytes, patch)
2006-04-23 16:14 CEST , Benedikt Meurer
no flags
Effective User Patch 1 (566 bytes, patch)
2006-04-23 19:31 CEST , Stefan Rehm
no flags
Effective User Patch 2 (1.53 KB, patch)
2006-04-23 19:31 CEST , Stefan Rehm
no flags
Next try (7.73 KB, patch)
2006-04-23 21:17 CEST , Benedikt Meurer
no flags

Additional information