linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: bugzilla-daemon@kernel.org
To: linux-xfs@vger.kernel.org
Subject: [Bug 215687] chown behavior on XFS is changed
Date: Tue, 15 Mar 2022 08:30:44 +0000	[thread overview]
Message-ID: <bug-215687-201763-kbkLH78Owo@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-215687-201763@https.bugzilla.kernel.org/>

https://bugzilla.kernel.org/show_bug.cgi?id=215687

--- Comment #1 from Zorro Lang (zlang@redhat.com) ---
Oh, looks like the failures come from below testing:

expect 0 mkdir ${n0} 0755
expect 0 chown ${n0} 65534 65533
expect 0 chmod ${n0} 06555
expect 06555 lstat ${n0} mode
expect 0 -u 65534 -g 65533,65532 chown ${n0} 65534 65532
case "${os}:${fs}" in
Linux:glusterfs)
        expect "0555,65534,65532|06555,65534,65532" lstat ${n0} mode,uid,gid
        ;;
Linux:xfs)
        expect 0555,65534,65532 lstat ${n0} mode,uid,gid
        ;;
Linux:*)
        expect 06555,65534,65532 lstat ${n0} mode,uid,gid
        ;;
*)
        expect 0555,65534,65532 lstat ${n0} mode,uid,gid
        ;;
esac

If a directory has S_ISUID(04000) and S_ISGID(02000) permission bits, XFS will
lost these 2 bits after chown the group of the directory. But now it keeps
these two bits:

# mkdir dir
# chown 65534:65533 dir
# chmod 06555 dir
# ls -ld dir
dr-sr-sr-x. 2 nobody 65533 6 Mar 15 16:26 dir
# chown 65534:65532 dir
# ls -ld dir
dr-sr-sr-x. 2 nobody 65532 6 Mar 15 16:26 dir


Hmm... please help to make sure if this's an expected behavior change, or an
unexpected regression? Thanks.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

  reply	other threads:[~2022-03-15  8:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-15  8:12 [Bug 215687] New: chown behavior on XFS is changed bugzilla-daemon
2022-03-15  8:30 ` bugzilla-daemon [this message]
2022-03-15  9:21 ` [Bug 215687] " bugzilla-daemon
2022-03-24 10:22 ` [Bug 215687] New: " Thorsten Leemhuis
2022-03-24 12:50   ` Thorsten Leemhuis
2022-03-24 10:22 ` [Bug 215687] " bugzilla-daemon
2022-03-24 12:00 ` bugzilla-daemon
2022-03-24 12:50 ` bugzilla-daemon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-215687-201763-kbkLH78Owo@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).