copies don't respect setuid and setgid settings

Bug #364683 reported by sylvain just
26
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Nautilus
New
Medium
nautilus (Ubuntu)
Triaged
Low
Ubuntu Desktop Bugs

Bug Description

Binary package hint: nautilus

Release: 8.10

I'am not sure that nautilus is only one package implied. My nautilus version is 1:2.24.1-0ubuntu1

Description of problem :

I have 2 users : user-a and user-b (with respective first group: groups group-a and group-b)
they are both in third group named common-group.

Their own HomeDirectory are : (ls -l /home/user*)
drwxrwx--- 5 user-a group-a 4096 2009-04-20 14:00 user-a
drwxrwx--- 5 user-b group-b 4096 2009-04-20 14:02 user-b
and umask 007

The common directory : (ls -l /home/common*)
drwxrws--- 2 root common-group 4096 2009-04-20 14:03 common-directory
(chmod 2770)

So, when I copy or move some files or directories from the HomeDirectories with CLI (cp or mv), setgid bit is preserved and owner group too.

But if I copy-paste or drag'n drop from nautilus, directories or files moved/copied keep old owner group and old permissions (without setgid bit).

This Problem is same for a deported or local filesystem (nfs / two local partition of a same hard drive / two directories of a same parititon / a local parititon and an usb key).

Exemple:

~$ ls -l /home/*
/home/common-directory/:
total 0

/home/user-a/:
total 4
drwxrwx--- 2 user-a group-a 4096 2009-04-21 17:07 user-a.dir
-rw-rw---- 1 user-a group-a 0 2009-04-21 17:08 user-a.file

/home/user-b/:
total 4
drwxrwx--- 2 user-b group-b 4096 2009-04-21 17:07 user-b.dir
-rw-rw---- 1 user-b group-b 0 2009-04-21 17:07 user-b.file
~$ su user-a
user-a: ~$ umask
0007
user-a: ~$ cp -rv * ../common-directory/
`user-a.dir' -> `../common-directory/user-a.dir'
`user-a.file' -> `../common-directory/user-a.file'
user-a: ~$ ls -l ../common-directory/
total 4
drwxrws--- 2 user-a common-group 4096 2009-04-21 17:15 user-a.dir
-rw-rw---- 1 user-a common-group 0 2009-04-21 17:15 user-a.file

So when I'm log in gnome with User "user-b" and I copy paste through nautilus the files in my home directory, the result is bellow :

user-a: ~$ ls -l ../common-directory/
total 8
drwxrws--- 2 user-a common-group 4096 2009-04-21 17:15 user-a.dir
-rw-rw---- 1 user-a common-group 0 2009-04-21 17:15 user-a.file
drwxrwx--- 2 user-b common-group 4096 2009-04-21 17:24 user-b.dir
-rw-rw---- 1 user-b group-b 0 2009-04-21 17:24 user-b.file

Then, owner group isn't good for file copied from nautilus interface and setgid bit isn't present for direcory...

NB: I tried to use gvfs-copy command. Result is good for file (good owner group, good permissions) but with directory, error message is :
"Impossible to copy a repertory recursively"

Thanks in advance for fix :)

sylvain just (sy-just)
description: updated
Revision history for this message
Sebastien Bacher (seb128) wrote :

thank you for your bug report, that's an upstream issue and should be sent to bugzilla.gnome.org

Changed in nautilus (Ubuntu):
assignee: nobody → Ubuntu Desktop Bugs (desktop-bugs)
importance: Undecided → Low
summary: - nautilus drag'n drop / copy paste does not respect setgid bit
- permissions / owner group
+ copies don't respect setuid and setgid settings
sylvain just (sy-just)
description: updated
description: updated
Revision history for this message
sylvain just (sy-just) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

thank you for sending the bug to GNOME

Changed in nautilus (Ubuntu):
status: New → Triaged
Changed in nautilus:
status: Unknown → New
Changed in nautilus:
importance: Unknown → Medium
Revision history for this message
Sebastien Bacher (seb128) wrote :

Is that still an issue in newer Ubuntu versions?

Changed in nautilus (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
mirohe (miguelrodriguezhernando) wrote :

Hi Sebastien Bacher

I tried it on ubuntu 16.04 and 18.04 and the error is also true.
In other more recent versions, I do not know.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for the reply, in fact it seems basically the same issue as in bug #1812818

Changed in nautilus (Ubuntu):
status: Incomplete → Triaged
Revision history for this message
Sebastien Bacher (seb128) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.