Files
apfstests/nfs4acl/ctime.test
T
Tim Shimmin 841b609ec9 Check in Andreas Gruenbacher's nfs v4 acl tests into the xfstests suite.
Merge of master-melb:xfs-cmds:32058a by kenmcd.

  Run all the tests in xfstests/nfs4acl
2008-09-05 06:18:15 +00:00

37 lines
676 B
Plaintext

$ mkdir d
$ cd d
$ whoami
> root
$ touch a b
$ sleep 1
Without write access, the ctime cannot be changed.
$ su bin
$ touch a
> touch: cannot touch `a': Permission denied
With write access, the ctime can be set to the current time, but not to
any other time:
$ su
$ nfs4acl --set 'bin:rw::allow' a
$ su bin
$ touch a
$ [ b -ot a ] || echo 'b should be older than a'
$ touch -r b a
> touch: setting times of `a': Operation not permitted
With set_attributes access, the ctime can be set to an arbitrary time:
$ su
$ nfs4acl --set 'bin:rwt::allow' a
$ su bin
$ touch -r b a
$ [ b -ot a -o a -ot b ] && echo 'a should be as old as b'
$ su
$ cd ..
$ rm -rf d