1b3af24b4SEnji Cooper# Copyright (c) 2008, 2009 Edward Tomasz Napierała <trasz@FreeBSD.org> 2b3af24b4SEnji Cooper# 3b3af24b4SEnji Cooper# Redistribution and use in source and binary forms, with or without 4b3af24b4SEnji Cooper# modification, are permitted provided that the following conditions 5b3af24b4SEnji Cooper# are met: 6b3af24b4SEnji Cooper# 1. Redistributions of source code must retain the above copyright 7b3af24b4SEnji Cooper# notice, this list of conditions and the following disclaimer. 8b3af24b4SEnji Cooper# 2. Redistributions in binary form must reproduce the above copyright 9b3af24b4SEnji Cooper# notice, this list of conditions and the following disclaimer in the 10b3af24b4SEnji Cooper# documentation and/or other materials provided with the distribution. 11b3af24b4SEnji Cooper# 12b3af24b4SEnji Cooper# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 13b3af24b4SEnji Cooper# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 14b3af24b4SEnji Cooper# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 15b3af24b4SEnji Cooper# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 16b3af24b4SEnji Cooper# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 17b3af24b4SEnji Cooper# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 18b3af24b4SEnji Cooper# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 19b3af24b4SEnji Cooper# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 20b3af24b4SEnji Cooper# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 21b3af24b4SEnji Cooper# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 22b3af24b4SEnji Cooper# SUCH DAMAGE. 23b3af24b4SEnji Cooper# 24b3af24b4SEnji Cooper# 25b3af24b4SEnji Cooper 26b3af24b4SEnji Cooper# This is a tools-level test for POSIX.1e ACL functionality. Run it as root 27b3af24b4SEnji Cooper# using ACL-enabled kernel: 28b3af24b4SEnji Cooper# 29b3af24b4SEnji Cooper# /usr/src/tools/regression/acltools/run /usr/src/tools/regression/acltools/tools-posix.test 30b3af24b4SEnji Cooper# 31b3af24b4SEnji Cooper# WARNING: Creates files in unsafe way. 32b3af24b4SEnji Cooper 33b3af24b4SEnji Cooper$ whoami 34b3af24b4SEnji Cooper> root 35b3af24b4SEnji Cooper$ umask 022 36b3af24b4SEnji Cooper 37b3af24b4SEnji Cooper# Smoke test for getfacl(1). 38b3af24b4SEnji Cooper$ touch xxx 39b3af24b4SEnji Cooper$ getfacl -n xxx 40b3af24b4SEnji Cooper> # file: xxx 41b3af24b4SEnji Cooper> # owner: root 42b3af24b4SEnji Cooper> # group: wheel 43b3af24b4SEnji Cooper> user::rw- 44b3af24b4SEnji Cooper> group::r-- 45b3af24b4SEnji Cooper> other::r-- 46b3af24b4SEnji Cooper 47b3af24b4SEnji Cooper$ getfacl -q xxx 48b3af24b4SEnji Cooper> user::rw- 49b3af24b4SEnji Cooper> group::r-- 50b3af24b4SEnji Cooper> other::r-- 51b3af24b4SEnji Cooper 52b3af24b4SEnji Cooper$ setfacl -m u:42:r,g:43:w xxx 53b3af24b4SEnji Cooper$ getfacl -n xxx 54b3af24b4SEnji Cooper> # file: xxx 55b3af24b4SEnji Cooper> # owner: root 56b3af24b4SEnji Cooper> # group: wheel 57b3af24b4SEnji Cooper> user::rw- 58b3af24b4SEnji Cooper> user:42:r-- 59b3af24b4SEnji Cooper> group::r-- 60b3af24b4SEnji Cooper> group:43:-w- 61b3af24b4SEnji Cooper> mask::rw- 62b3af24b4SEnji Cooper> other::r-- 63b3af24b4SEnji Cooper 64b3af24b4SEnji Cooper# Check whether ls correctly marks files with "+". 65b3af24b4SEnji Cooper$ ls -l xxx | cut -d' ' -f1 66b3af24b4SEnji Cooper> -rw-rw-r--+ 67b3af24b4SEnji Cooper 68b3af24b4SEnji Cooper# Same as above, but for symlinks. 69b3af24b4SEnji Cooper$ ln -s xxx lll 70b3af24b4SEnji Cooper$ getfacl -h lll 71b3af24b4SEnji Cooper> # file: lll 72b3af24b4SEnji Cooper> # owner: root 73b3af24b4SEnji Cooper> # group: wheel 74b3af24b4SEnji Cooper> user::rwx 75b3af24b4SEnji Cooper> group::r-x 76b3af24b4SEnji Cooper> other::r-x 77b3af24b4SEnji Cooper 78b3af24b4SEnji Cooper$ getfacl -qh lll 79b3af24b4SEnji Cooper> user::rwx 80b3af24b4SEnji Cooper> group::r-x 81b3af24b4SEnji Cooper> other::r-x 82b3af24b4SEnji Cooper 83b3af24b4SEnji Cooper$ getfacl -q lll 84b3af24b4SEnji Cooper> user::rw- 85b3af24b4SEnji Cooper> user:42:r-- 86b3af24b4SEnji Cooper> group::r-- 87b3af24b4SEnji Cooper> group:43:-w- 88b3af24b4SEnji Cooper> mask::rw- 89b3af24b4SEnji Cooper> other::r-- 90b3af24b4SEnji Cooper 91b3af24b4SEnji Cooper$ setfacl -hm u:44:x,g:45:w lll 92b3af24b4SEnji Cooper$ getfacl -h lll 93b3af24b4SEnji Cooper> # file: lll 94b3af24b4SEnji Cooper> # owner: root 95b3af24b4SEnji Cooper> # group: wheel 96b3af24b4SEnji Cooper> user::rwx 97b3af24b4SEnji Cooper> user:44:--x 98b3af24b4SEnji Cooper> group::r-x 99b3af24b4SEnji Cooper> group:45:-w- 100b3af24b4SEnji Cooper> mask::rwx 101b3af24b4SEnji Cooper> other::r-x 102b3af24b4SEnji Cooper 103b3af24b4SEnji Cooper$ ls -l lll | cut -d' ' -f1 104b3af24b4SEnji Cooper> lrwxrwxr-x+ 105b3af24b4SEnji Cooper 106b3af24b4SEnji Cooper# Check whether the original file is left untouched. 107b3af24b4SEnji Cooper$ ls -l xxx | cut -d' ' -f1 108b3af24b4SEnji Cooper> -rw-rw-r--+ 109b3af24b4SEnji Cooper 110b3af24b4SEnji Cooper$ rm lll 111b3af24b4SEnji Cooper 112b3af24b4SEnji Cooper# Test removing entries. 113b3af24b4SEnji Cooper$ setfacl -x user:42: xxx 114b3af24b4SEnji Cooper$ getfacl xxx 115b3af24b4SEnji Cooper> # file: xxx 116b3af24b4SEnji Cooper> # owner: root 117b3af24b4SEnji Cooper> # group: wheel 118b3af24b4SEnji Cooper> user::rw- 119b3af24b4SEnji Cooper> group::r-- 120b3af24b4SEnji Cooper> group:43:-w- 121b3af24b4SEnji Cooper> mask::rw- 122b3af24b4SEnji Cooper> other::r-- 123b3af24b4SEnji Cooper 124b3af24b4SEnji Cooper$ setfacl -m u:42:r xxx 125b3af24b4SEnji Cooper$ getfacl -n xxx 126b3af24b4SEnji Cooper> # file: xxx 127b3af24b4SEnji Cooper> # owner: root 128b3af24b4SEnji Cooper> # group: wheel 129b3af24b4SEnji Cooper> user::rw- 130b3af24b4SEnji Cooper> user:42:r-- 131b3af24b4SEnji Cooper> group::r-- 132b3af24b4SEnji Cooper> group:43:-w- 133b3af24b4SEnji Cooper> mask::rw- 134b3af24b4SEnji Cooper> other::r-- 135b3af24b4SEnji Cooper 136b3af24b4SEnji Cooper# Test removing entries by number. 137b3af24b4SEnji Cooper$ setfacl -x 1 xxx 138b3af24b4SEnji Cooper$ getfacl -n xxx 139b3af24b4SEnji Cooper> # file: xxx 140b3af24b4SEnji Cooper> # owner: root 141b3af24b4SEnji Cooper> # group: wheel 142b3af24b4SEnji Cooper> user::rw- 143b3af24b4SEnji Cooper> group::r-- 144b3af24b4SEnji Cooper> group:43:-w- 145b3af24b4SEnji Cooper> mask::rw- 146b3af24b4SEnji Cooper> other::r-- 147b3af24b4SEnji Cooper 148b3af24b4SEnji Cooper$ setfacl -m g:43:r xxx 149b3af24b4SEnji Cooper$ getfacl -n xxx 150b3af24b4SEnji Cooper> # file: xxx 151b3af24b4SEnji Cooper> # owner: root 152b3af24b4SEnji Cooper> # group: wheel 153b3af24b4SEnji Cooper> user::rw- 154b3af24b4SEnji Cooper> group::r-- 155b3af24b4SEnji Cooper> group:43:r-- 156b3af24b4SEnji Cooper> mask::r-- 157b3af24b4SEnji Cooper> other::r-- 158b3af24b4SEnji Cooper 159b3af24b4SEnji Cooper# Make sure cp without any flags does not copy the ACL. 160b3af24b4SEnji Cooper$ cp xxx yyy 161b3af24b4SEnji Cooper$ ls -l yyy | cut -d' ' -f1 162b3af24b4SEnji Cooper> -rw-r--r-- 163b3af24b4SEnji Cooper 164b3af24b4SEnji Cooper# Make sure it does with the "-p" flag. 165b3af24b4SEnji Cooper$ rm yyy 166b3af24b4SEnji Cooper$ cp -p xxx yyy 167b3af24b4SEnji Cooper$ getfacl -n yyy 168b3af24b4SEnji Cooper> # file: yyy 169b3af24b4SEnji Cooper> # owner: root 170b3af24b4SEnji Cooper> # group: wheel 171b3af24b4SEnji Cooper> user::rw- 172b3af24b4SEnji Cooper> group::r-- 173b3af24b4SEnji Cooper> group:43:r-- 174b3af24b4SEnji Cooper> mask::r-- 175b3af24b4SEnji Cooper> other::r-- 176b3af24b4SEnji Cooper 177b3af24b4SEnji Cooper$ rm yyy 178b3af24b4SEnji Cooper 179b3af24b4SEnji Cooper# Test removing entries by... by example? 180b3af24b4SEnji Cooper$ setfacl -m u:42:r,g:43:w xxx 181b3af24b4SEnji Cooper$ setfacl -x u:42: xxx 182b3af24b4SEnji Cooper$ getfacl -n xxx 183b3af24b4SEnji Cooper> # file: xxx 184b3af24b4SEnji Cooper> # owner: root 185b3af24b4SEnji Cooper> # group: wheel 186b3af24b4SEnji Cooper> user::rw- 187b3af24b4SEnji Cooper> group::r-- 188b3af24b4SEnji Cooper> group:43:-w- 189b3af24b4SEnji Cooper> mask::rw- 190b3af24b4SEnji Cooper> other::r-- 191b3af24b4SEnji Cooper 192b3af24b4SEnji Cooper# Test setfacl -b. 193b3af24b4SEnji Cooper$ setfacl -b xxx 194b3af24b4SEnji Cooper$ getfacl -n xxx 195b3af24b4SEnji Cooper> # file: xxx 196b3af24b4SEnji Cooper> # owner: root 197b3af24b4SEnji Cooper> # group: wheel 198b3af24b4SEnji Cooper> user::rw- 199b3af24b4SEnji Cooper> group::r-- 200b3af24b4SEnji Cooper> mask::r-- 201b3af24b4SEnji Cooper> other::r-- 202b3af24b4SEnji Cooper 203b3af24b4SEnji Cooper$ ls -l xxx | cut -d' ' -f1 204b3af24b4SEnji Cooper> -rw-r--r--+ 205b3af24b4SEnji Cooper 206b3af24b4SEnji Cooper$ setfacl -nb xxx 207b3af24b4SEnji Cooper$ getfacl -n xxx 208b3af24b4SEnji Cooper> # file: xxx 209b3af24b4SEnji Cooper> # owner: root 210b3af24b4SEnji Cooper> # group: wheel 211b3af24b4SEnji Cooper> user::rw- 212b3af24b4SEnji Cooper> group::r-- 213b3af24b4SEnji Cooper> other::r-- 214b3af24b4SEnji Cooper 215b3af24b4SEnji Cooper$ ls -l xxx | cut -d' ' -f1 216b3af24b4SEnji Cooper> -rw-r--r-- 217b3af24b4SEnji Cooper 218b3af24b4SEnji Cooper# Check setfacl(1) and getfacl(1) with multiple files. 219b3af24b4SEnji Cooper$ touch xxx yyy zzz 220b3af24b4SEnji Cooper 221b3af24b4SEnji Cooper$ ls -l xxx yyy zzz | cut -d' ' -f1 222b3af24b4SEnji Cooper> -rw-r--r-- 223b3af24b4SEnji Cooper> -rw-r--r-- 224b3af24b4SEnji Cooper> -rw-r--r-- 225b3af24b4SEnji Cooper 226b3af24b4SEnji Cooper$ setfacl -m u:42:x,g:43:w nnn xxx yyy zzz 227*6951c4eeSMark Johnston> setfacl: nnn: acl_get_file() failed: No such file or directory 228b3af24b4SEnji Cooper 229b3af24b4SEnji Cooper$ ls -l nnn xxx yyy zzz | cut -d' ' -f1 230b3af24b4SEnji Cooper> ls: nnn: No such file or directory 231b3af24b4SEnji Cooper> -rw-rwxr--+ 232b3af24b4SEnji Cooper> -rw-rwxr--+ 233b3af24b4SEnji Cooper> -rw-rwxr--+ 234b3af24b4SEnji Cooper 235b3af24b4SEnji Cooper$ getfacl -nq nnn xxx yyy zzz 236b3af24b4SEnji Cooper> getfacl: nnn: stat() failed: No such file or directory 237b3af24b4SEnji Cooper> user::rw- 238b3af24b4SEnji Cooper> user:42:--x 239b3af24b4SEnji Cooper> group::r-- 240b3af24b4SEnji Cooper> group:43:-w- 241b3af24b4SEnji Cooper> mask::rwx 242b3af24b4SEnji Cooper> other::r-- 243b3af24b4SEnji Cooper> 244b3af24b4SEnji Cooper> user::rw- 245b3af24b4SEnji Cooper> user:42:--x 246b3af24b4SEnji Cooper> group::r-- 247b3af24b4SEnji Cooper> group:43:-w- 248b3af24b4SEnji Cooper> mask::rwx 249b3af24b4SEnji Cooper> other::r-- 250b3af24b4SEnji Cooper> 251b3af24b4SEnji Cooper> user::rw- 252b3af24b4SEnji Cooper> user:42:--x 253b3af24b4SEnji Cooper> group::r-- 254b3af24b4SEnji Cooper> group:43:-w- 255b3af24b4SEnji Cooper> mask::rwx 256b3af24b4SEnji Cooper> other::r-- 257b3af24b4SEnji Cooper 258b3af24b4SEnji Cooper$ setfacl -b nnn xxx yyy zzz 259*6951c4eeSMark Johnston> setfacl: nnn: acl_get_file() failed: No such file or directory 260b3af24b4SEnji Cooper 261b3af24b4SEnji Cooper$ ls -l nnn xxx yyy zzz | cut -d' ' -f1 262b3af24b4SEnji Cooper> ls: nnn: No such file or directory 263b3af24b4SEnji Cooper> -rw-r--r--+ 264b3af24b4SEnji Cooper> -rw-r--r--+ 265b3af24b4SEnji Cooper> -rw-r--r--+ 266b3af24b4SEnji Cooper 267b3af24b4SEnji Cooper$ setfacl -bn nnn xxx yyy zzz 268*6951c4eeSMark Johnston> setfacl: nnn: acl_get_file() failed: No such file or directory 269b3af24b4SEnji Cooper 270b3af24b4SEnji Cooper$ ls -l nnn xxx yyy zzz | cut -d' ' -f1 271b3af24b4SEnji Cooper> ls: nnn: No such file or directory 272b3af24b4SEnji Cooper> -rw-r--r-- 273b3af24b4SEnji Cooper> -rw-r--r-- 274b3af24b4SEnji Cooper> -rw-r--r-- 275b3af24b4SEnji Cooper 276b3af24b4SEnji Cooper$ rm xxx yyy zzz 277b3af24b4SEnji Cooper 278b3af24b4SEnji Cooper# Check whether chmod actually does what it should do. 279b3af24b4SEnji Cooper$ touch xxx 280b3af24b4SEnji Cooper$ setfacl -m u:42:rwx,g:43:rwx xxx 281b3af24b4SEnji Cooper$ chmod 600 xxx 282b3af24b4SEnji Cooper$ getfacl -n xxx 283b3af24b4SEnji Cooper> # file: xxx 284b3af24b4SEnji Cooper> # owner: root 285b3af24b4SEnji Cooper> # group: wheel 286b3af24b4SEnji Cooper> user::rw- 287b3af24b4SEnji Cooper> user:42:rwx # effective: --- 288b3af24b4SEnji Cooper> group::r-- # effective: --- 289b3af24b4SEnji Cooper> group:43:rwx # effective: --- 290b3af24b4SEnji Cooper> mask::--- 291b3af24b4SEnji Cooper> other::--- 292b3af24b4SEnji Cooper 293b3af24b4SEnji Cooper$ chmod 060 xxx 294b3af24b4SEnji Cooper$ getfacl -n xxx 295b3af24b4SEnji Cooper> # file: xxx 296b3af24b4SEnji Cooper> # owner: root 297b3af24b4SEnji Cooper> # group: wheel 298b3af24b4SEnji Cooper> user::--- 299b3af24b4SEnji Cooper> user:42:rwx # effective: rw- 300b3af24b4SEnji Cooper> group::r-- 301b3af24b4SEnji Cooper> group:43:rwx # effective: rw- 302b3af24b4SEnji Cooper> mask::rw- 303b3af24b4SEnji Cooper> other::--- 304b3af24b4SEnji Cooper 305b3af24b4SEnji Cooper# Test default ACLs. 306b3af24b4SEnji Cooper$ umask 022 307b3af24b4SEnji Cooper$ mkdir ddd 308b3af24b4SEnji Cooper$ getfacl -qn ddd 309b3af24b4SEnji Cooper> user::rwx 310b3af24b4SEnji Cooper> group::r-x 311b3af24b4SEnji Cooper> other::r-x 312b3af24b4SEnji Cooper 313b3af24b4SEnji Cooper$ ls -l | grep ddd | cut -d' ' -f1 314b3af24b4SEnji Cooper> drwxr-xr-x 315b3af24b4SEnji Cooper 316b3af24b4SEnji Cooper$ getfacl -dq ddd 317b3af24b4SEnji Cooper$ setfacl -dm u::rwx,g::rx,o::rx,mask::rwx ddd 318b3af24b4SEnji Cooper$ getfacl -dqn ddd 319b3af24b4SEnji Cooper> user::rwx 320b3af24b4SEnji Cooper> group::r-x 321b3af24b4SEnji Cooper> mask::rwx 322b3af24b4SEnji Cooper> other::r-x 323b3af24b4SEnji Cooper 324b3af24b4SEnji Cooper# No change - ls(1) output doesn't take into account default ACLs. 325b3af24b4SEnji Cooper$ ls -l | grep ddd | cut -d' ' -f1 326b3af24b4SEnji Cooper> drwxr-xr-x 327b3af24b4SEnji Cooper 328b3af24b4SEnji Cooper$ setfacl -dm g:42:rwx,u:42:r ddd 329b3af24b4SEnji Cooper$ setfacl -dm g::w ddd 330b3af24b4SEnji Cooper$ getfacl -dqn ddd 331b3af24b4SEnji Cooper> user::rwx 332b3af24b4SEnji Cooper> user:42:r-- 333b3af24b4SEnji Cooper> group::-w- 334b3af24b4SEnji Cooper> group:42:rwx 335b3af24b4SEnji Cooper> mask::rwx 336b3af24b4SEnji Cooper> other::r-x 337b3af24b4SEnji Cooper 338b3af24b4SEnji Cooper$ setfacl -dx group:42: ddd 339b3af24b4SEnji Cooper$ getfacl -dqn ddd 340b3af24b4SEnji Cooper> user::rwx 341b3af24b4SEnji Cooper> user:42:r-- 342b3af24b4SEnji Cooper> group::-w- 343b3af24b4SEnji Cooper> mask::rw- 344b3af24b4SEnji Cooper> other::r-x 345b3af24b4SEnji Cooper 346b3af24b4SEnji Cooper$ ls -l | grep ddd | cut -d' ' -f1 347b3af24b4SEnji Cooper> drwxr-xr-x 348b3af24b4SEnji Cooper 349b3af24b4SEnji Cooper$ rmdir ddd 350b3af24b4SEnji Cooper$ rm xxx 351b3af24b4SEnji Cooper 352b3af24b4SEnji Cooper# Test inheritance. 353b3af24b4SEnji Cooper$ mkdir ddd 354b3af24b4SEnji Cooper 355b3af24b4SEnji Cooper$ touch ddd/xxx 356b3af24b4SEnji Cooper$ getfacl -q ddd/xxx 357b3af24b4SEnji Cooper> user::rw- 358b3af24b4SEnji Cooper> group::r-- 359b3af24b4SEnji Cooper> other::r-- 360b3af24b4SEnji Cooper 361b3af24b4SEnji Cooper$ mkdir ddd/ddd 362b3af24b4SEnji Cooper$ getfacl -q ddd/ddd 363b3af24b4SEnji Cooper> user::rwx 364b3af24b4SEnji Cooper> group::r-x 365b3af24b4SEnji Cooper> other::r-x 366b3af24b4SEnji Cooper 367b3af24b4SEnji Cooper$ rmdir ddd/ddd 368b3af24b4SEnji Cooper$ rm ddd/xxx 369b3af24b4SEnji Cooper 370b3af24b4SEnji Cooper$ setfacl -dm u::rwx,g::rx,o::rx,mask::rwx ddd 371b3af24b4SEnji Cooper$ setfacl -dm g:42:rwx,u:43:r ddd 372b3af24b4SEnji Cooper$ getfacl -dq ddd 373b3af24b4SEnji Cooper> user::rwx 374b3af24b4SEnji Cooper> user:43:r-- 375b3af24b4SEnji Cooper> group::r-x 376b3af24b4SEnji Cooper> group:42:rwx 377b3af24b4SEnji Cooper> mask::rwx 378b3af24b4SEnji Cooper> other::r-x 379b3af24b4SEnji Cooper 380b3af24b4SEnji Cooper$ touch ddd/xxx 381b3af24b4SEnji Cooper$ getfacl -q ddd/xxx 382b3af24b4SEnji Cooper> user::rw- 383b3af24b4SEnji Cooper> user:43:r-- 384b3af24b4SEnji Cooper> group::r-x # effective: r-- 385b3af24b4SEnji Cooper> group:42:rwx # effective: r-- 386b3af24b4SEnji Cooper> mask::r-- 387b3af24b4SEnji Cooper> other::r-- 388b3af24b4SEnji Cooper 389b3af24b4SEnji Cooper$ mkdir ddd/ddd 390b3af24b4SEnji Cooper$ getfacl -q ddd/ddd 391b3af24b4SEnji Cooper> user::rwx 392b3af24b4SEnji Cooper> user:43:r-- 393b3af24b4SEnji Cooper> group::r-x 394b3af24b4SEnji Cooper> group:42:rwx # effective: r-x 395b3af24b4SEnji Cooper> mask::r-x 396b3af24b4SEnji Cooper> other::r-x 397b3af24b4SEnji Cooper 398b3af24b4SEnji Cooper$ rmdir ddd/ddd 399b3af24b4SEnji Cooper$ rm ddd/xxx 400b3af24b4SEnji Cooper$ rmdir ddd 401b3af24b4SEnji Cooper 402b3af24b4SEnji Cooper# Test if we deal properly with fifos. 403b3af24b4SEnji Cooper$ mkfifo fff 404b3af24b4SEnji Cooper$ ls -l fff | cut -d' ' -f1 405b3af24b4SEnji Cooper> prw-r--r-- 406b3af24b4SEnji Cooper 407b3af24b4SEnji Cooper$ setfacl -m u:42:r,g:43:w fff 408b3af24b4SEnji Cooper$ getfacl fff 409b3af24b4SEnji Cooper> # file: fff 410b3af24b4SEnji Cooper> # owner: root 411b3af24b4SEnji Cooper> # group: wheel 412b3af24b4SEnji Cooper> user::rw- 413b3af24b4SEnji Cooper> user:42:r-- 414b3af24b4SEnji Cooper> group::r-- 415b3af24b4SEnji Cooper> group:43:-w- 416b3af24b4SEnji Cooper> mask::rw- 417b3af24b4SEnji Cooper> other::r-- 418b3af24b4SEnji Cooper 419b3af24b4SEnji Cooper$ ls -l fff | cut -d' ' -f1 420b3af24b4SEnji Cooper> prw-rw-r--+ 421b3af24b4SEnji Cooper 422b3af24b4SEnji Cooper$ setfacl -bn fff 423b3af24b4SEnji Cooper$ getfacl fff 424b3af24b4SEnji Cooper> # file: fff 425b3af24b4SEnji Cooper> # owner: root 426b3af24b4SEnji Cooper> # group: wheel 427b3af24b4SEnji Cooper> user::rw- 428b3af24b4SEnji Cooper> group::r-- 429b3af24b4SEnji Cooper> other::r-- 430b3af24b4SEnji Cooper 431b3af24b4SEnji Cooper$ ls -l fff | cut -d' ' -f1 432b3af24b4SEnji Cooper> prw-r--r-- 433b3af24b4SEnji Cooper 434b3af24b4SEnji Cooper$ rm fff 435b3af24b4SEnji Cooper 436b3af24b4SEnji Cooper# Test if we deal properly with device files. 437b3af24b4SEnji Cooper$ mknod bbb b 1 1 438b3af24b4SEnji Cooper$ setfacl -m u:42:r,g:43:w bbb 439b3af24b4SEnji Cooper> setfacl: bbb: acl_get_file() failed: Operation not supported 440b3af24b4SEnji Cooper$ ls -l bbb | cut -d' ' -f1 441b3af24b4SEnji Cooper> brw-r--r-- 442b3af24b4SEnji Cooper 443b3af24b4SEnji Cooper$ rm bbb 444b3af24b4SEnji Cooper 445b3af24b4SEnji Cooper$ mknod ccc c 1 1 446b3af24b4SEnji Cooper$ setfacl -m u:42:r,g:43:w ccc 447b3af24b4SEnji Cooper> setfacl: ccc: acl_get_file() failed: Operation not supported 448b3af24b4SEnji Cooper$ ls -l ccc | cut -d' ' -f1 449b3af24b4SEnji Cooper> crw-r--r-- 450b3af24b4SEnji Cooper 451b3af24b4SEnji Cooper$ rm ccc 452