Viewing: getfacl-noacl.test
Getfacl utility option parsing tests. This test can be run on a
filesystem with or without ACL support.
$ mkdir test
$ cd test
$ umask 027
$ touch x
$ getfacl --omit-header x
> user::rw-
> group::r--
> other::---
>
$ getfacl --omit-header --access x
> user::rw-
> group::r--
> other::---
>
$ getfacl --omit-header -d x
$ getfacl --omit-header -d .
$ getfacl --omit-header -d /
> getfacl: Removing leading '/' from absolute path names
$ getfacl --skip-base x
$ getfacl --omit-header --all-effective x
> user::rw-
> group::r--
> other::---
>
$ getfacl --omit-header --no-effective x
> user::rw-
> group::r--
> other::---
>
$ mkdir d
$ touch d/y
various version of getfacl handle symlink differently
# $ ln -s d l
The result of "getfacl -dR . | grep file | sort" is related with
the dentry item order in parent directory. Such order depends on
FS implementation. Fix with -P (--physical) option.
# $ getfacl -dR . | grep file | sort
$ getfacl -dRP . | grep file | sort
> # file: .
> # file: d
> # file: d/y
> # file: x
$ ln -s d l
$ ln -s l ll
# $ getfacl -dLR ll | grep file | sort
# (rhel4)
# > # file: ll
# > # file: ll/y
# (rhel5)
# > # file: l
# > # file: l/y
$ rm l ll x
$ rm -rf d
$ cd ..
$ rmdir test