DragonFly BSD
DragonFly users List (threaded) for 2012-09
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: /bin/ls vs .dotted files


From: Dan Cross <crossd@xxxxxxxxx>
Date: Fri, 14 Sep 2012 14:15:29 +0530

On Thu, Sep 13, 2012 at 7:45 PM, sad@bestmx.ru <sad@bestmx.ru> wrote:
> 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????????????????????????

Probably a better question is why 'dotfiles' are ever hidden by ls.
This was an historical mistake that never got corrected.

As for why the default behavior for root is different, it's probably
to help system administrators see past the munchkin trick of intruders
trying to cover their tracks by hiding things in, e.g., dot
directories.  If one runs 'ls' as root and sees, '.h4x0Rd00d', it's a
good indication that you've got a problem.

        - Dan C.

(http://pub.gajendra.net/2012/09/dotfiles)



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]