Permissions or How to Hide Things

I promised in the last post that I’d tell you how to fix that little problem where Hydra can see in the Insight directory, also known as a permissions problem. We call that a big ‘oops’ because we don’t want them to see anything in there.

The Insight directory looked like:

drwxr-xr-x  2 computerlamp  shield  68 Nov 13 09:56 Insight/

Our problem has two parts that we need to fix. First, the group permissions on this directory don’t let the shield group write to it. Secondly, the world (that is, anyone!) can see in the directory. Let’s start with the first problem. We want shield to be able to write in that directory.

The command we’re going to use is called chmod. So I want the group permissions to look like rwx. I can do this:

Alpha:~ computerlamp$ chmod g=rwx Insight

That means change the permissions on Insight for the group to read, write and execute. Check out the results in ls -l:

drwxrwxr-x  2 computerlamp  shield  68 Nov 13 09:56 Insight/

I’m halfway there. I want the last three letters, those things that are currently r-x to be . The chmod command for that looks like:

Alpha:~ computerlamp$ chmod o=--- Insight

We’ve done it! Hydra is prevented from seeing in the Insight directory.  We fixed our permissions problem.

drwxrwx---  2 computerlamp  shield  68 Nov 13 09:56 Insight/

Then we have the horrible moment when S.H.I.E.L.D. fell and we discovered that Hydra was part of S.H.I.E.L.D. all along. This means we need to remove that group access from Project Insight, though it’s probably a little late. But we do what we can, which includes blowing up helicarriers. The command to remove all access from the group is:

Alpha:~ computerlamp$ chmod g=--- Insight

Checking things out with ls -l again, we see:

drwx------  2 computerlamp  shield  68 Nov 13 09:56 Insight/

Which means that only I can read what’s in that directory, write to it, or make anything run.

Leave a Reply

Your email address will not be published. Required fields are marked *