You are not logged in.

#1 2013-08-21 09:39:23

ningfengrui
Member
Registered: 2013-08-20
Posts: 4

[solved] "permission denied" even though I am logged in as root

Hi, I just installed Arch and now I am trying to add repositories to pacman.
I am currently logged in as root

 [root@arch ~]#

Now I am trying to access /etc/pacman.conf by typing

/etc/pacman.conf

wich returns

-basch: /etc/pacman.conf: Permission denied

So I checked the forum and the wiki how to check permissions for files. found this wiki.archlinux.org/index.php/File_Permi … ermissions

so I did

# cd /etc
# ls -l

wich gave me

-rw-r--r-- 1 root root 2862 Jun 18 06:01 pacman.conf

If I read this correctly it says that "root" can read and write. But I am logged in as "root" so why can I not edit the file?

Last edited by ningfengrui (2013-08-21 09:50:17)

Offline

#2 2013-08-21 09:43:18

flipper T
Member
Registered: 2012-09-14
Posts: 419

Re: [solved] "permission denied" even though I am logged in as root

you need to specify an editor

try

sudo nano /etc/pacman.conf

or if you are already root...

nano /etc/pacman.conf

Last edited by flipper T (2013-08-21 09:44:25)


If I'm curt with you it's because time is a factor. I think fast, I talk fast and I need you guys to act fast if you wanna get out of this. So, pretty please... with sugar on top. Clean the [censored] car. -The Wolf

Offline

#3 2013-08-21 09:49:45

ningfengrui
Member
Registered: 2013-08-20
Posts: 4

Re: [solved] "permission denied" even though I am logged in as root

flipper T wrote:

you need to specify an editor

Aw man, now I feel stupid sad I just did the whole installation using nano and then I forgot such a simple part.

Thanks for saving my newbie ass!

Offline

#4 2013-08-21 09:55:15

flipper T
Member
Registered: 2012-09-14
Posts: 419

Re: [solved] "permission denied" even though I am logged in as root

No problem at all & welcome to arch.

If you had not been so new, I would not of been this kind to you because the first result of a google search of  "basch: /etc/pacman.conf: Permission denied" would have given you the answer you needed smile

But hey! we all make the same mistake, but be sure to search for the answer before you ask here.

Also, you need to edit the title of your original post to read "[Solved]  "permission denied" even though I am logged in as root"

lecture over ! & again, welcome to arch


If I'm curt with you it's because time is a factor. I think fast, I talk fast and I need you guys to act fast if you wanna get out of this. So, pretty please... with sugar on top. Clean the [censored] car. -The Wolf

Offline

Board footer

Powered by FluxBB