Whamcloud - gitweb
land b_hd_sec onto HEAD:
[fs/lustre-release.git] / lustre / tests / acl_asroot.test
1 !
2 ! Test that can only be run as root as it uses mknod.
3 !
4 $mkdir asroot
5 $ umask 027
6 $ mknod asroot/null c 1 3
7 $ acl_mode asroot/null
8 crw-r-----
9 $ setfacl -m u:joe:rw,u:lisa:- asroot/null
10 $ acl_mode asroot/null
11 crw-rw----+
12 $ setfacl -m u:lisa:r asroot/null
13 $ getfacl --omit-header asroot/null
14 user::rw-
15 user:joe:rw-
16 user:lisa:r--
17 group::r--
18 mask::rw-
19 other::---
20
21 $ su - lisa -c chmod\ +rw\ /mnt/lustre/asroot/null
22 chmod: changing permissions of `/mnt/lustre/asroot/null': Operation not permitted
23 $ rm -f asroot/null
24 $ mkfifo asroot/fifo
25 $ acl_mode asroot/fifo
26 prw-r-----
27 $ setfacl -m u:joe:- asroot/fifo
28 $ getfacl --omit-header asroot/fifo
29 user::rw-
30 user:joe:---
31 group::r--
32 mask::r--
33 other::---
34
35 $ rm asroot/fifo
36 $ mknod asroot/block b 1 1
37 $ setfacl -m u:joe:- asroot/block
38 $ getfacl --omit-header asroot/block
39 user::rw-
40 user:joe:---
41 group::r--
42 mask::r--
43 other::---
44
45 $ rm asroot/block
46 $ rmdir asroot