fsstress: translate flags in fiemap_f
[xfstests-dev.git] / nfs4acl / ctime.test
1 $ mkdir d
2 $ cd d
3
4 $ whoami
5 > root
6
7 $ touch a b
8 $ sleep 1
9
10 Without write access, the ctime cannot be changed.
11         $ su bin
12         $ touch a
13         > touch: cannot touch `a': Permission denied
14
15 With write access, the ctime can be set to the current time, but not to
16 any other time:
17         $ su
18         $ nfs4acl --set 'bin:rw::allow' a
19
20         $ su bin
21         $ touch a
22         $ [ b -ot a ] || echo 'b should be older than a'
23         $ touch -r b a
24         > touch: setting times of `a': Operation not permitted
25
26 With set_attributes access, the ctime can be set to an arbitrary time:
27         $ su
28         $ nfs4acl --set 'bin:rwt::allow' a
29
30         $ su bin
31         $ touch -r b a
32         $ [ b -ot a -o a -ot b ] && echo 'a should be as old as b'
33
34 $ su
35 $ cd ..
36 $ rm -rf d