LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   slackware chmod problem (https://www.linuxquestions.org/questions/linux-software-2/slackware-chmod-problem-319822/)

sohlris 05-03-2005 04:04 PM

slackware chmod problem
 
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

kaplans 05-03-2005 04:06 PM

thanx

Tinkster 05-03-2005 04:38 PM

Re: slackware chmod problem
 
Quote:

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


Cheers,
Tink

sohlris 05-03-2005 04:59 PM

What I meant to say is Im not "exactly" sure what they did. I can no longer "./rc.sshd start".

root@X:/etc/rc.d# ./rc.sshd start
bash: ./rc.sshd: Permission denied

That being said I really need to reverse the effects of those chmod and chattr commands.

Tinkster 05-03-2005 05:19 PM

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 ...


Cheers,
Tink

sohlris 05-03-2005 05:22 PM

thanks you very much. im using the reiserfs file system.
oddly enough I did a chmod 700 and I can now start everything just fine.


All times are GMT -5. The time now is 11:49 AM.