Whamcloud - gitweb
land b_colibri_devel on HEAD:
[fs/lustre-release.git] / lustre / tests / rmtacl / cp.test
1 The "lfs cp" utility should only copy ACLs if `-p' is given.
2  
3         $ umask 022
4         $ mkdir d
5         $ cd d
6         $ touch f
7         $ lfs lsetfacl -m u:bin:rw f
8         $ lfs ls -l f | awk -- '{ print $1 }'
9         > -rw-rw-r--+
10         
11         $ lfs cp f g
12         $ lfs ls -l g | awk -- '{ print $1 }'
13         > -rw-r--r--
14         
15         $ rm g
16         $ lfs cp -p f g
17         $ lfs ls -l f | awk -- '{ print $1 }'
18         > -rw-rw-r--+
19         
20         $ mkdir h
21         $ echo blubb > h/x
22         $ lfs cp -rp h i
23         $ cat i/x
24         > blubb
25
26         $ rm -r i
27
28 Use to be "$lfs lsetfacl -R -m u:bin:rwX h", but RHEL4 uncorrectly set the x flag,
29 so we change to the following test
30
31         $ lfs lsetfacl -R -m u:bin:rwx h
32         $ lfs lgetfacl --omit-header h/x
33         > user::rw-
34         > user:bin:rwx
35         > group::r--
36         > mask::rwx
37         > other::r--
38         >
39
40         $ lfs cp -rp h i
41         $ lfs lgetfacl --omit-header i/x
42         > user::rw-
43         > user:bin:rwx
44         > group::r--
45         > mask::rwx
46         > other::r--
47         >
48
49         $ cd ..
50         $ rm -r d