Whamcloud - gitweb
add more and adjust acl test script.
[fs/lustre-release.git] / lustre / tests / acl / cp.test
1 The cp utility should only copy ACLs if `-p' is given.
2  
3         $ umask 022
4         $ mkdir d
5         $ cd d
6         $ touch f
7         $ setfacl -m u:bin:rw f
8         $ ls -l f | awk -- '{ print $1 }'
9         > -rw-rw-r--+
10         
11         $ cp f g
12         $ ls -l g | awk -- '{ print $1 }'
13         > -rw-r--r--
14         
15         $ rm g
16         $ cp -p f g
17         $ ls -l f | awk -- '{ print $1 }'
18         > -rw-rw-r--+
19         
20         $ mkdir h
21         $ echo blubb > h/x
22         $ cp -rp h i
23         $ cat i/x
24         > blubb
25
26         $ rm -r i
27         $ setfacl -R -m u:bin:rwX h
28         $ getfacl --omit-header h/x
29         > user::rw-
30         > user:bin:rwx
31         > group::r--
32         > mask::rwx
33         > other::r--
34         >
35
36         $ cp -rp h i
37         $ getfacl --omit-header i/x
38         > user::rw-
39         > user:bin:rwx
40         > group::r--
41         > mask::rwx
42         > other::r--
43         >
44
45         $ cd ..
46         $ rm -r d