Can't Figure out What I Did to Our Environment FreeBSD6.2.

2007-05-23 Thread Martin McCormick
I discovered that the file utility works for some
accounts on a new FreeBSD system but not others.  When it
doesn't work, the response is:

file: could not find any magic files!

If I am su'd to root, me, or any of several other
accounts on the system, I get that same error.  Still other user
ID's in the same class can use file just fine.

The /etc/profile file is used to develop the users'
paths so most of them are the same plus added local paths if
someone has $HOME/bin or $HOME/etc.

Any other suggestions at what I should look at?  This is
one of those dumb things that is driving me crazy today.:-)  All
I know is I probably caused this but I am at a loss as to how.

The man page for file says that MAGIC can be set to the
location of one of the .mgc files.  None of the accounts that do
correctly use file have this variable set.  At least you don't
see it in the output of env.

Thanks for any suggestions.

Martin McCormick WB5AGZ  Stillwater, OK 
Systems Engineer
OSU Information Technology Department Network Operations Group
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Can't Figure out What I Did to Our Environment FreeBSD6.2.

2007-05-23 Thread Roland Smith
On Wed, May 23, 2007 at 03:31:27PM -0500, Martin McCormick wrote:
   I discovered that the file utility works for some
 accounts on a new FreeBSD system but not others.  When it
 doesn't work, the response is:
 
 file: could not find any magic files!
 
   If I am su'd to root, me, or any of several other
 accounts on the system, I get that same error.  Still other user
 ID's in the same class can use file just fine.

   Any other suggestions at what I should look at?  This is
 one of those dumb things that is driving me crazy today.:-)  All
 I know is I probably caused this but I am at a loss as to how.

Maybe the ownership and/or permissions of /usr/share/misc are wrong?

Roland
-- 
R.F.Smith   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)


pgpX7Kfy52VGU.pgp
Description: PGP signature


Re: Can't Figure out What I Did to Our Environment FreeBSD6.2. fixed

2007-05-23 Thread Martin McCormick
Roland Smith writes:
 Maybe the ownership and/or permissions of /usr/share/misc are wrong?

I checked against another system that isn't having any
trouble and found the permissions to be exactly the same.  I
then ran strace -e trace=file to see what all it opens when
being run.

Bingo!

It opens a file in one's home directory called .magic.
I had created a file called .magic in all our home directories
for a totally unrelated purpose, never dreaming that somebody
else was looking for that name.  It doesn't even need to exist
because file only uses it if it is there.  Since our .magic has
nothing that the file utility recognizes, it breaks.

I named our .magic file to something else and everything
began to work perfectly.  The reason why some accounts worked
before and others didn't is that not every single account had
this rogue .magic file I had made for another purpose.

Thanks for your help and my apologies for wasting your
time.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]