Today I needed to lock down some data so that it could only be accessed by a particular user and his group. We wanted to make sure that this archive was not modified, so I needed to lock down the permissions. For a long time, I don't think I fully understood that directory permissions are much different than file permissions. To get around this, I did my chmod in 2 steps. First, I did a
find -type d -exec chmod 550 {} \;
This needs to be 550 because the execute bit on a directory is actually an "access" bit. If you don't set it, you can't access the directory.
Then I did:
find -type f -exec chmod 440 {} \;
This gets the regular files and sets them to read only with no world access. Fairly basic, but I thought somebody might find it useful if they're struggling.
The One About The Important Thing
-
One hundred episodes. For this occasion, years in the coming, Lyle and I
talk about the thing itself — the nuts and bolts of the podcast, including
how the...
1 week ago
No comments:
Post a Comment