[NTLUG:Discuss] Help request

Chris Cox cjcox at acm.org
Sun Mar 7 15:18:43 CST 2010


Fred wrote:
> Strange... This morning I logged in to my account, read the mail
> then tried to save a picture to my Pictures directory and got an
> error that I didn't have access to that "folder". Here is what I found:
> 
> ALL of the non-hidden (not dot files) directories had their permissions 
> set to 444. After changing them back to 755, everything worked ok.
> 
> The question is, obviously, WTF would cause that to happen? I haven't
> heard of any Linux nasties floating around the net... and the cats
> haven't learned how to type (I hope).

Well I just recently got brought into a similar situation at
a company here in town.  Lots of things stopped working and they
did not know why.  When I examined the platform I found permissions
were wrong on many items (some were ok... turns out their sys admin
had already made some of the changes back).

At the end of the day, the manager had written a script that
was designed to set permissions correctly on a given directly.
The problem is that the script did things like:

chmod (some permission) $1/

etc.

And the manager execute the command without any parameter
and it changed the permissions of files in the / directory
which kept people from begin able to go into little things
like /lib (for example).

So... at the end of the day, as it is in MOST cases, it was
user error... it was just interesting how long it took the
manager to inform of his script :-)

So.. can't say what caused the issue... but it could be
some poorly written script or routine... perhaps something
written by somebody else, but usually it's things like that
which are the root cause.

Directories, in general, need to be traversed so the execute
bit is important.  My guess is that somehow somebody did:

chmod 444 *

in that directory.  Thus the hidden files were not touched
but both files and directories where changed to 444, which
is ok (maybe) for most non-executable files, but not a good thing
for directories.

Just taking some guesses.....




More information about the Discuss mailing list