LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 05-03-2005, 04:04 PM   #1
sohlris
LQ Newbie
 
Registered: Apr 2005
Distribution: Slackware
Posts: 6

Rep: Reputation: 0
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
 
Old 05-03-2005, 04:06 PM   #2
kaplans
LQ Newbie
 
Registered: May 2005
Posts: 1

Rep: Reputation: 0
thanx
 
Old 05-03-2005, 04:38 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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
 
Old 05-03-2005, 04:59 PM   #4
sohlris
LQ Newbie
 
Registered: Apr 2005
Distribution: Slackware
Posts: 6

Original Poster
Rep: Reputation: 0
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.
 
Old 05-03-2005, 05:19 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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
 
Old 05-03-2005, 05:22 PM   #6
sohlris
LQ Newbie
 
Registered: Apr 2005
Distribution: Slackware
Posts: 6

Original Poster
Rep: Reputation: 0
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What can we do if we type chmod ugo-x /bin/chmod ?????? bunny123 Linux - Software 3 02-01-2005 08:53 PM
CHMOD in shell : chmod 777 /usr/ <---is that right? cpanelskindepot Programming 5 07-16-2004 05:37 AM
CHMOD problem michn77 Linux - Newbie 0 02-12-2004 05:15 AM
chmod possible problem unimaginative Linux - General 4 01-01-2004 06:28 PM
chmod problem face_master Linux - General 34 01-28-2003 04:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration