/bin/ls vs .dotted files

Antonio Huete Jimenez ahuete.devel at gmail.com
Thu Sep 13 07:48:03 PDT 2012


"Some historical implementations of the ls utility show all entries in
a directory except dot and dot-dot when a superuser invokes ls without
specifying the -a option. When "normal" users invoke ls without
specifying -a, they should not see information about any files with
names beginning with a period unless they were named as file
operands."

http://pubs.opengroup.org/onlinepubs/009695399/utilities/ls.html

Cheers,
Antonio Huete

2012/9/13 sad at bestmx.ru <sad at bestmx.ru>:
> hi,
>
> it was just discovered that /bin/ls (without arguments)
> if called by root-user
> lists ".dotted" files
> (while expected to hide ".dotted" files unless -A specified)
>
> even more surprising is
> man ls
> that clearly says: "-A is always set for superuser"
> (which is absolutely peculiar!)
>
> WHY????????????????????????
>
>



More information about the Users mailing list