You are not logged in.

#1 2010-06-23 10:43:23

johnrl
Member
Registered: 2010-01-23
Posts: 12

bash: /opt/arch32/mirrorlist: Permission denied - arch32 help

Hi all.
I'm new to Arch Lin and i'm just trying out things to get to know Arch.
At the moment I'm trying to install a 32 bit subsystem as described here http://wiki.archlinux.org/index.php/Ins … _in_Arch64 but in the second step I get the following error:
"bash: /opt/arch32/mirrorlist: Permission denied"

The wiki says I should do
"sed -e 's/x86\_64/i686/g' /etc/pacman.d/mirrorlist > /opt/arch32/mirrorlist",
but that gives me the error above, so I also tried
"sudo sed -e 's/x86\_64/i686/g' /etc/pacman.d/mirrorlist > /opt/arch32/mirrorlist"
which also doesn't work. What's wrong?

PS: i created /opt/arch32 with "sudo mkdir".

Offline

#2 2010-06-23 10:47:25

hokasch
Member
Registered: 2007-09-23
Posts: 1,461

Re: bash: /opt/arch32/mirrorlist: Permission denied - arch32 help

run the sed command as root.

Offline

#3 2010-06-23 10:48:56

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,485
Website

Re: bash: /opt/arch32/mirrorlist: Permission denied - arch32 help

This:

sudo sed -e 's/x86\_64/i686/g' /etc/pacman.d/mirrorlist > /opt/arch32/mirrorlist

gives the sed root permission but not the writing to the file with ">".  There is probably a better way to do this but this will work...

sed -e 's/x86\_64/i686/g' /etc/pacman.d/mirrorlist > sudo tee /opt/arch32/mirrorlist

Offline

#4 2010-06-23 10:52:55

johnrl
Member
Registered: 2010-01-23
Posts: 12

Re: bash: /opt/arch32/mirrorlist: Permission denied - arch32 help

Thanks I will try that out!
I'm sorry if I am being stupid but again im very newt o this, but is there a difference between these two things:
> su
> touch hello.txt
and
> sudo touch hello.txt

I dont fully understand the concept of 'sudo' yet, from what I know sudo gives temporary su permission, but under the real user so the owner in the first case becomes root while the owner in the second case becomes whoever is executing the command - is this not how it is?

Offline

#5 2010-06-23 10:55:45

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,485
Website

Re: bash: /opt/arch32/mirrorlist: Permission denied - arch32 help

there is no difference between those two.   The issue is that piping output using ">" is considered a different command by sudo.

Offline

Board footer

Powered by FluxBB