[LU-378] POSIX: chmod.7: successful call to chmod("chmod-t.7b", 02770) did not change mode of file correctly Created: 31/May/11  Updated: 14/Aug/16  Resolved: 14/Aug/16

Status: Closed
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.0.0, Lustre 2.1.0, Lustre 1.8.8, Lustre 1.8.7, Lustre 1.8.6, Lustre 1.8.9
Fix Version/s: None

Type: Bug Priority: Blocker
Reporter: Jian Yu Assignee: Lai Siyao
Resolution: Won't Fix Votes: 0
Labels: None
Environment:

Lustre Branch: b1_8
Lustre Build: http://newbuild.whamcloud.com/job/lustre-b1_8/61/
Distro/Arch: CentOS5.6/x86_64(OFED 1.5.3, ext4)


Severity: 3
Bugzilla ID: 23,299
Rank (Obsolete): 6052

 Description   

Here is the result of running the LSB-VSX POSIX test suite (lts_vsx-pcts2.0beta2.tgz):
https://maloo.whamcloud.com/test_sets/f610526e-8b52-11e0-aab9-52540025f9af

The baseline is ext4.

####################################################
Test Name: chmod.7 Failed

	Test Description:
A call to chmod(path, mode) from a process without appropriate
privileges when the group owner of the regular file specified by path
does not match the effective group ID or one of the supplementary
group IDs shall clear the S_ISGID bit upon successful completion.
Posix Ref: Component CHMOD Assertion 5.6.4.2-29(A)

	Test Strategy:
VERIFY that process has suitable privileges
DETERMINE whether chmod() with appropriate privileges is permitted
from the environment variable VSX_PRIV_CHOWN_SUPP
ASSIGN the current process appropriate privileges using setprv() -
vport
DETERMINE whether setting S_ISUID and S_ISGID is permitted form the
environment variable VSX_SET_ID_MODES_SUPP
VERIFY that vsxg1 is not a supplementary group for this process
CREATE child process using cppair()
  SET effective group id to actual group id using setgid() and
  getegid()
  VERIFY that the effective and actual group ids are the same using
  getgid() and getegid()
  SET effective user id to actual user id using setuid() and geteuid()
  VERIFY that the effective and actual user ids are the same using
  getuid() and geteuid()
  REMOVE the CHOWN and SETID privileges from the current process using
  unsetprv()
  VERIFY that unsetprv() returned 0
  CREATE two files with all access modes available and S_ISGID set
CREATE child process using cppair()
  SET and VERIFY that the effective user and group ids are vsx1/vsxg1
  REMOVE the CHOWN and SETID privileges from the current process using
  unsetprv()
  FOR each file with mode excluding and including S_ISGID
    CHANGE the mode of the file using chmod() with the current file
    mode
    VERIFY that chmod() returned 0
    OBTAIN file status information for file using stat()
    VERIFY that the file status mode has the expected value

successful call to chmod("chmod-t.7b", 02770) did not change mode of
	file correctly
expected: 0770, observed: 02770



 Comments   
Comment by Jian Yu [ 17/Jun/11 ]

Lustre Branch: v1_8_6_RC2
Lustre Build: http://newbuild.whamcloud.com/job/lustre-b1_8/80/
e2fsprogs Build: http://newbuild.whamcloud.com/job/e2fsprogs-master/40/
Distro/Arch: RHEL5/x86_64(OFED 1.5.3.1, kernel version: 2.6.18-238.12.1.el5_lustre)

POSIX compliance testing report: https://maloo.whamcloud.com/test_sets/2cd4d244-98d1-11e0-9a27-52540025f9af

The baseline is ext4.

Comment by Jian Yu [ 18/Jul/11 ]

Lustre Tag: v2_0_65_0
Lustre Build: http://newbuild.whamcloud.com/job/lustre-master/204/
e2fsprogs Build: http://newbuild.whamcloud.com/job/e2fsprogs-master/42/
Distro/Arch: RHEL5/x86_64(OFED 1.5.3.1, kernel version: 2.6.18-238.12.1.el5)

POSIX compliance testing report: https://maloo.whamcloud.com/test_sets/e4ede34c-b13c-11e0-b33f-52540025f9af

The baseline is ext4.

Comment by Jian Yu [ 11/Oct/11 ]

Lustre Tag: v1_8_7_WC1_RC1
Lustre Build: http://newbuild.whamcloud.com/job/lustre-b1_8/142/
e2fsprogs Build: http://newbuild.whamcloud.com/job/e2fsprogs-master/65/
Distro/Arch: RHEL5/x86_64(server, OFED 1.5.3.2, ext4-based ldiskfs), RHEL6/x86_64(client, in-kernel OFED)

POSIX compliance testing report: https://maloo.whamcloud.com/test_sets/30866dc0-f3ef-11e0-908b-52540025f9af

The baseline is ext4.

Comment by Jian Yu [ 11/May/12 ]

Lustre Tag: v1_8_8_WC1_RC1
Lustre Build: http://build.whamcloud.com/job/lustre-b1_8/195/
e2fsprogs Build: http://build.whamcloud.com/job/e2fsprogs-master/278/
Distro/Arch: RHEL5.8/x86_64(server, ext4-based ldiskfs), RHEL6.2/x86_64(client)
Network: IB (in-kernel OFED)

POSIX compliance testing report: https://maloo.whamcloud.com/test_sets/99712946-9b2a-11e1-a0a0-52540035b04c

The baseline is ext4.

Comment by Jian Yu [ 09/Jan/13 ]

Lustre branch: b1_8
Lustre build: http://build.whamcloud.com/job/lustre-b1_8/240

The issue occurred again:
https://maloo.whamcloud.com/test_sets/a31e42ac-5aa7-11e2-bcf5-52540035b04c

Comment by Peter Jones [ 10/Jan/13 ]

Lai will look into this one

Comment by Lai Siyao [ 17/Jan/13 ]

I wrote a similar test for chmod(S_ISGID), and found it could pass. I'll setup POSIX test suite in my test environment and test again.

Comment by Jian Yu [ 17/Jan/13 ]

Lai, FYI, bug 23299 contains useful comments.

Comment by Jian Yu [ 14/Feb/13 ]

Lustre Tag: v1_8_9_WC1_RC1
Lustre Build: http://build.whamcloud.com/job/lustre-b1_8/256
Distro/Arch: RHEL5.9/x86_64(server), RHEL6.3/x86_64(client)
Network: TCP (1GigE)
ENABLE_QUOTA=yes

The same failure occurred:
https://maloo.whamcloud.com/test_sets/5cae6178-7684-11e2-bc2f-52540035b04c

Comment by James A Simmons [ 14/Aug/16 ]

Really old block for unsupported version.

Generated at Sat Feb 10 01:06:26 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.