Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I was blindly following a slackware hardening guide and did this:
Init scripts permission
/etc/rc.d
# chmod -R o-rwx /etc/rc.d
# chattr +i /etc/rc.d/*
Im not sure what these did , as I usually use commands like "chmod 700 and 755", and have never once used chattr. I would like to reverse whatever effect these had and have it set to where only root can edit or execute the files in that directory. I have slackware configured to start in runlevel 4. If only root can edit or execute these, if I login as my "regular" user will they still be launched like they should be?
Also, I added the file rc.firewall and configured it to my needs. I set it to chmod 755. Will it be run by default?
As you can tell I'm very new to linux security.
-Thanks in advance and please excuse any typos
Originally posted by sohlris
Im not sure what these did , as I usually use commands like "chmod 700 and 755", and have never once used chattr. I would like to reverse whatever effect these had and have it set to where only root can edit or execute the files in that directory. I have slackware configured to start in runlevel 4. If only root can edit or execute these, if I login as my "regular" user will they still be launched like they should be?
If there were no ill effects why revert?
All the stuff in rc.d gets run before a user
logs in (or on shutdown, respectively).
Quote:
Also, I added the file rc.firewall and configured it to my needs. I set it to chmod 755. Will it be run by default?
No - you have to explicitly call it from one of
the scripts that get run anyway, most appropriate
candidate being rc.local
chmod -R o-rwx /etc/rc.d
will ttake away read, write and execute from OTHER,
it's equivalent to
chmod -R XX0 /etc/rc.d
where XX is 7 or 5 (or what you had there previously).
root shouldn't be affected if you didn't accidently
type a instead of o in the command ...
What's the output of ls -l for /etc/rc.d?
The chattr sets files to be immutable, that is:
even the owner can't change them, but it only
works on ext2/3 ...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.