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

Bizarre ls Behavior



	I mounted the iso image of a FreeBSD UNIX file system on a
Debian platform in order to look at it.  That's when I discovered the
oddity.  There is a bin directory referenced to the root of the CDROM.
If I am in that directory as myself (normal user account), I get
absolutely nothing if I do ls.  My first thought was that bin was
empty.  I then did

find . -name "*" -print  and all the files one would normally
associate with /bin were listed.  If I became superuser, I could list
/bin by actually going there and doing ls.  Nothing at all looks weird
about this directory.  If I am myself, I can cd to /cdrom and do ls
bin and see all the files.  I just can't produce any output if I do ls
from within bin.  I can even be specific and ls a file such as cat or date and
I still get nothing.

	I thought it might be permission-related so I used cpio to
regenerate a whole new copy of that CDROM in a read/write file system
so I could play with the bits.  I did chmod 777 on the whole file tree
and I still couldn't produce any output from ls, ls -l or ls -a.  It's
not permissions.

	Other directories seem normal.  What could possibly be going
on here?  Here is a listing of what is in bin.  There is a file named
[ but that is the only strange thing in the listing and it is not
causing the behavior:

total 5346
-r-xr-xr-x    4 root     root        54640 Jan 21 09:45 [
-r-xr-xr-x    2 root     root        69076 Jan 21 09:45 cat
-r-xr-xr-x    2 root     root        60760 Jan 21 09:45 chio
-r-xr-xr-x    2 root     root        66348 Jan 21 09:45 chmod
-r-xr-xr-x    2 root     root        70708 Jan 21 09:45 cp
-r-xr-xr-x    4 root     root       651868 Jan 21 09:45 csh
-r-xr-xr-x    2 root     root       190756 Jan 21 09:45 date
-r-xr-xr-x    2 root     root        79548 Jan 21 09:45 dd
-r-xr-xr-x    2 root     root        63028 Jan 21 09:45 df
-r-xr-xr-x    2 root     root        51524 Jan 21 09:45 domainname
-r-xr-xr-x    2 root     root        48080 Jan 21 09:45 echo
-r-xr-xr-x    4 root     root       144816 Jan 21 09:45 ed
-r-xr-xr-x    2 root     root       103808 Jan 21 09:45 expr
-r-xr-xr-x    2 root     root        51620 Jan 21 09:45 hostname
-r-xr-xr-x    2 root     root        52972 Jan 21 09:45 kill
-r-xr-xr-x    4 root     root        52996 Jan 21 09:45 link
-r-xr-xr-x    4 root     root        52996 Jan 21 09:45 ln
-r-xr-xr-x    2 root     root       301376 Jan 21 09:45 ls
-r-xr-xr-x    2 root     root        54320 Jan 21 09:45 mkdir
-r-xr-xr-x    2 root     root       175632 Jan 21 09:45 mv
-r-xr-xr-x    2 root     root       290128 Jan 21 09:45 pax
-r-xr-xr-x    2 root     root       219140 Jan 21 09:45 ps
-r-xr-xr-x    4 root     root        61644 Jan 21 09:45 pwd
-r-xr-xr-x    2 root     root       522548 Jan 21 09:47 rcp
-r-xr-xr-x    4 root     root        61644 Jan 21 09:45 realpath
-r-xr-xr-x    4 root     root       144816 Jan 21 09:45 red
-r-xr-xr-x    4 root     root       177096 Jan 21 09:45 rm
-r-xr-xr-x    2 root     root        58904 Jan 21 09:45 rmail
-r-xr-xr-x    2 root     root        50772 Jan 21 09:45 rmdir
-r-xr-xr-x    2 root     root       461344 Jan 21 09:45 sh
-r-xr-xr-x    2 root     root        48784 Jan 21 09:45 sleep
-r-xr-xr-x    2 root     root        74900 Jan 21 09:45 stty
-r-xr-xr-x    2 root     root        12540 Jan 21 09:45 sync
-r-xr-xr-x    4 root     root       651868 Jan 21 09:45 tcsh
-r-xr-xr-x    4 root     root        54640 Jan 21 09:45 test
-r-xr-xr-x    4 root     root       177096 Jan 21 09:45 unlink

	Thanks for any hints as to why this directory doesn't list if
one is in it but does list if one is either root or doing ls from
outside the bin directory.

Martin McCormick WB5AGZ  Stillwater, OK 
OSU Information Technology Division Network Operations Group



Reply to: