You are not logged in.

#1 2008-05-03 08:33:09

Lazer
Banned
Registered: 2007-08-02
Posts: 111

Can't edit config files on a newly installed Arch Linux

I just installed Arch Linux on my laptop and everything have gone OK so far. But now when I've booted Arch and logged in as root and try to edit any config file I get a "Permission denied" error. For example if I type /etc/rc.conf into the console, I just get "Permission denied" back. Any help to get for a newbie?

Offline

#2 2008-05-03 08:43:48

Isomorphism
Member
Registered: 2008-04-29
Posts: 41

Re: Can't edit config files on a newly installed Arch Linux

Lazer wrote:

I just installed Arch Linux on my laptop and everything have gone OK so far. But now when I've booted Arch and logged in as root and try to edit any config file I get a "Permission denied" error. For example if I type /etc/rc.conf into the console, I just get "Permission denied" back. Any help to get for a newbie?

I am a newbie myself,
But try,

[spai@L ~]$ ls -l  /etc/rc.conf
-rw-r--r-- 1 root root 2987 2008-05-03 14:12 /etc/rc.conf

The "-rw"of the "-rw-r--r--" line says the owner(which is root here) can read and write.
In case your rc.conf doesnt have read write permissions for the root change it and then you can edit without any problem big_smile

Hopefully...it will work,
Isomorphism

Offline

#3 2008-05-03 08:46:38

Ghost1227
Forum Fellow
From: Omaha, NE, USA
Registered: 2008-04-21
Posts: 1,422
Website

Re: Can't edit config files on a newly installed Arch Linux

If I'm reading your post correctly, you're typing '/etc/rc.conf' to edit it. By just typing this, it is attempting to execute the file rather than open for editing. You need to open it with a text editor (I use vi, but if you're new you might want to try nano for now). Try typing 'nano /etc/rc.conf' in your terminal and going from there.


.:[My Blog] || [My GitHub]:.

Offline

#4 2008-05-03 08:50:38

Isomorphism
Member
Registered: 2008-04-29
Posts: 41

Re: Can't edit config files on a newly installed Arch Linux

Ghost1227 wrote:

If I'm reading your post correctly, you're typing '/etc/rc.conf' to edit it.

Oh! You are right. How silly of me sad

I tried that and I got permission denied too. So you are not opening it in with a text editor.

Sorry
Isomorphism

Offline

#5 2008-05-03 08:52:37

Lazer
Banned
Registered: 2007-08-02
Posts: 111

Re: Can't edit config files on a newly installed Arch Linux

Well, um, I have an even more noobish question. smile What of that in the code box am I supposed to write into the console?

Offline

#6 2008-05-03 09:01:06

Isomorphism
Member
Registered: 2008-04-29
Posts: 41

Re: Can't edit config files on a newly installed Arch Linux

Lazer wrote:

Well, um, I have an even more noobish question. smile What of that in the code box am I supposed to write into the console?

Type 'nano /etc/rc.conf'.(Without ' ')

It will open the file in "nano". Nano is a text editor where you can edit rc.conf.

Offline

#7 2008-05-03 09:07:00

Lazer
Banned
Registered: 2007-08-02
Posts: 111

Re: Can't edit config files on a newly installed Arch Linux

Ah, thanks. smile That worked. big_smile

Offline

#8 2008-05-03 09:09:10

Ghost1227
Forum Fellow
From: Omaha, NE, USA
Registered: 2008-04-21
Posts: 1,422
Website

Re: Can't edit config files on a newly installed Arch Linux

Hey everyone's gotta start somewhere!


.:[My Blog] || [My GitHub]:.

Offline

#9 2008-05-03 09:12:46

Sigi
Member
From: Thurgau, Switzerland
Registered: 2005-09-22
Posts: 1,131

Re: Can't edit config files on a newly installed Arch Linux

Isomorphism wrote:
Ghost1227 wrote:

If I'm reading your post correctly, you're typing '/etc/rc.conf' to edit it.

Oh! You are right. How silly of me sad

I tried that and I got permission denied too. So you are not opening it in with a text editor.

Sorry
Isomorphism

And you're opening as root, right?


Haven't been here in a while. Still rocking Arch. smile

Offline

#10 2008-05-03 10:03:59

tj
Member
Registered: 2008-01-11
Posts: 48

Re: Can't edit config files on a newly installed Arch Linux

shouldn't that be

nano -w /etc/rc.conf

followed by
ctrl+o to write out after editing
all done as root of course

Offline

#11 2009-07-07 13:01:16

Dregath
Member
From: Australia
Registered: 2009-07-07
Posts: 19
Website

Re: Can't edit config files on a newly installed Arch Linux

I've just installed Arch Linux for the first time and i'm also getting this error.
When I open it with nano and then try to save it wont let me?
I read somewhere about using the chmod command to change something as well?
Sorry if this seems stupid, im very new to linux!

Offline

#12 2009-07-07 13:04:10

rebugger
Member
From: Germany
Registered: 2007-10-28
Posts: 229

Re: Can't edit config files on a newly installed Arch Linux

I'm not sure if Arch is the right distribution for "getting startet with linux". Fedora or Linux Mint (a Ubutuntu fork) might be a good start.

Offline

#13 2009-07-07 13:09:40

Dregath
Member
From: Australia
Registered: 2009-07-07
Posts: 19
Website

Re: Can't edit config files on a newly installed Arch Linux

Well, my computer has been dual booting with Ubuntu for the last month so I'm not that new.
But I've read a lot of good things about Arch Linux and I'm interested in giving it a go, even if it takes a bit of trial and error smile

Offline

#14 2009-07-07 13:37:36

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: Can't edit config files on a newly installed Arch Linux

su -c "nano /etc/rc.conf"

or `su -` and then edit.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#15 2009-07-07 14:03:20

XFire
Member
From: UK
Registered: 2008-05-11
Posts: 192

Re: Can't edit config files on a newly installed Arch Linux

Yeah, you may need root permissions ^^ to edit the file. During install you are by default root.

Look in the wiki for setting up sudo.


There is a difference between bleeding [edge] and haemorrhaging. - Allan

Offline

#16 2009-07-07 15:08:25

Dregath
Member
From: Australia
Registered: 2009-07-07
Posts: 19
Website

Re: Can't edit config files on a newly installed Arch Linux

Thank you, but I ended up reinstalling because I wasn't happy with my partition layout and tried it again and it worked fine, must of been something I didn't do in the installation most (I didn't go through all the config's originally so that might of been why)

Offline

#17 2009-07-07 16:11:54

Ronin-Sage
Member
Registered: 2008-10-24
Posts: 153
Website

Re: Can't edit config files on a newly installed Arch Linux

Or save yourself the trouble of obscure argument/option-passing and install sudo and run "sudo vi /etc/rc.conf" or "sudo nano /etc/rc.conf" >.>

Offline

#18 2009-07-07 17:33:56

Garns
Member
Registered: 2008-05-28
Posts: 239

Re: Can't edit config files on a newly installed Arch Linux

Ronin-Sage wrote:

Or save yourself the trouble of obscure argument/option-passing and install sudo and run "sudo vi /etc/rc.conf" or "sudo nano /etc/rc.conf" >.>

I don't want to get into a discussion of su vs sudo, but could you please enlighten me about the "obscureness" of su -c when calling an editor?

Offline

#19 2009-07-07 17:38:54

toad
Member
From: if only I knew
Registered: 2008-12-22
Posts: 1,775
Website

Re: Can't edit config files on a newly installed Arch Linux

man su says:

-c, --command=COMMAND
              pass a single COMMAND to the shell with -c


never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::

Offline

#20 2009-07-07 18:25:27

windtalker
Member
Registered: 2008-03-17
Posts: 220

Re: Can't edit config files on a newly installed Arch Linux

No sarcasm intended but it looks like a simple thing is being made complicated.
To prevent confusing yourself while learning just:

su    -enter
"your root password"   -enter

type:  nano /etc/rc.conf     -enter [leave a space between nano and the /]

use the arrow keys and space bar to navigate and make your changes.

to save your changes strike ctrl and x in that order followed by y for yes.

Last edited by windtalker (2009-07-07 18:26:25)

Offline

Board footer

Powered by FluxBB