mate-desktop / caja

Caja, the file manager for the MATE desktop
https://mate-desktop.org/
Other
264 stars 145 forks source link

caja ignores the setgid bit when copying a file to a folder with setgid bit set #1695

Open mherweg opened 1 year ago

mherweg commented 1 year ago

Expected behaviour

same as with "cp" command , same as caja 1.24

Actual behaviour

GID of the copied file does not change, stays the same. The setgid bit and the group of the destination folder is not respected.

Steps to reproduce the behaviour

create a folder with setgid bit set:

mkdir destfolder chgrp cdrom destfolder chmod g+s destfolder

create a file in your home:

touch testfile,

copy it using caja into the folder "destfolder" and copy it with cp and compare the resulting GID

MATE general version

ubuntu-mate-desktop 1.282

Package version

caja 1.26.0-1ubuntu1

Linux Distribution

ubuntu 22.04

Link to bugreport of your Distribution (requirement)

TBA

mherweg commented 1 year ago

I confirmed this behavior on another machine.

mherweg commented 1 year ago

same behavior on Linux Mint 21.1 (Mate Edition), caja Version: 1.26.0

mherweg commented 1 year ago

caja-setgid-bug

mherweg commented 1 year ago

the bug is not present in older version (1.24) of caja