LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 11-20-2001, 03:07 PM   #1
Jimbo Mahoney
LQ Newbie
 
Registered: Aug 2001
Location: Nottingham, England, UK
Distribution: Mandrake 8.0
Posts: 25

Rep: Reputation: 15
Talking Quick and easy answer please


I need to be able to write to rc.firewall to set my iptables up at boot.

I am familiar with vi and this is what I shall use to edit it, but how do I change the permissions on the file?

It's read-only at the mo.

Do I log in as root and use chmod u+x or something like that?

Cheers

Jimbo
 
Old 11-20-2001, 03:18 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
no!

you should NEVER change the attribs on a file like that.. most caes you can if you really think you need to, or no one will notice, but it's very bad theory / practise.

you should only edit the system files as root, that's the point of users and superusers.

if you don't know how to be root, just use 'su' when logged in, the file should be editable by root already.
 
Old 11-20-2001, 03:20 PM   #3
isajera
Senior Member
 
Registered: Jun 2001
Location: San Antonio, TX
Distribution: distro? what's a distro?
Posts: 1,635

Rep: Reputation: 45
if you login as root, the permissions don't matter too much. if you want to be able to edit it as a user other than root, then you need to use chmod.

chmod 666 rc.firewall
...or
chmod 777 rc.firewall (i can't remember whether or not the script needs to be executable)
 
Old 11-20-2001, 03:25 PM   #4
isajera
Senior Member
 
Registered: Jun 2001
Location: San Antonio, TX
Distribution: distro? what's a distro?
Posts: 1,635

Rep: Reputation: 45
*sigh*... yeah... kewp's right. you really shouldn't mess with the perms on that particular file. it's a security thing. it's not important if you just use linux on your home computer, but any self-respecting admin would commit hari-kari before letting a boot script be global-anything.
 
Old 11-20-2001, 03:44 PM   #5
Jimbo Mahoney
LQ Newbie
 
Registered: Aug 2001
Location: Nottingham, England, UK
Distribution: Mandrake 8.0
Posts: 25

Original Poster
Rep: Reputation: 15
ok.

kewl.
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Quick Question....Easy Answer iammike Linux - Software 2 08-22-2004 02:09 PM
Accepting Shabang Scripts (Quick & Easy Question, Just Can't Find Answer) overbored Programming 3 03-24-2004 07:41 PM
Probably an easy answer to this LOL Linuxfrog Mandriva 2 01-17-2004 07:38 PM
Easy question to answer! Please help alpineidyll Linux - Software 7 11-16-2003 03:42 PM
Easy question to answer BajaNick Programming 3 08-03-2003 06:49 PM


All times are GMT -5. The time now is 03: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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration