You are not logged in.

#1 2006-08-07 15:03:05

zagabar
Member
Registered: 2006-08-05
Posts: 33

permission denied!

Hi.

I just installed Archlinux with the FTP install and I have added one user. The problem is that I dont have permission to open /etc/rc.conf even if I am logged in as root. It seems as well as i dont have permission to view any configurationfiles.

Offline

#2 2006-08-07 15:23:06

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,694
Website

Re: permission denied!

You seem to have root access since you created a new account. Log in as root and change the permissions of /etc/rc.conf like this:

 chmod 644 /etc/rc.conf

and that should solve the problem.

Offline

#3 2006-08-07 15:28:39

zagabar
Member
Registered: 2006-08-05
Posts: 33

Re: permission denied!

Nope it didn't work. It's not that I want my user to have permission, I want root to have permission. Even if i only log in as root, i cannot open the file. Permission denied.

Offline

#4 2006-08-07 15:31:02

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,694
Website

Re: permission denied!

I see. In that case I would think that something went wrong with the FTP installation. You may need to re-install.

Offline

#5 2006-08-07 15:35:28

zagabar
Member
Registered: 2006-08-05
Posts: 33

Re: permission denied!

OK, im going to try that now...

Offline

#6 2006-08-07 16:00:13

zagabar
Member
Registered: 2006-08-05
Posts: 33

Re: permission denied!

Nope, i still havent got permission.

Offline

#7 2006-08-07 16:18:15

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,694
Website

Re: permission denied!

Ok, that's odd.
Try to open the file using

cat /etc/rc.conf

you should be able to see the file like that if everything is otherwise OK.

Also issue

ls -l /etc/rc.conf

and post the results, I'd like to see the permissions of the file.

Offline

#8 2006-08-07 17:14:16

zagabar
Member
Registered: 2006-08-05
Posts: 33

Re: permission denied!

hmmmm.

If I type cat /etc/rc.conf then I am able to display it but not edit it.

[root@myhost ~]# ls -l /etc/rc-conf
-rw-r--r-- 1 root root 2716 Aug 6 22:03 /ect/rc.conf

Is this the way it should be?

Offline

#9 2006-08-07 17:27:35

jrepan
Member
From: Estonia
Registered: 2006-01-30
Posts: 22

Re: permission denied!

zagabar wrote:

Is this the way it should be?

Yes

Offline

#10 2006-08-07 17:28:32

zagabar
Member
Registered: 2006-08-05
Posts: 33

Re: permission denied!

But how come that I cannot open the files, just view them?

Offline

#11 2006-08-07 18:11:06

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,694
Website

Re: permission denied!

OK. You can see the file and seems also that the permissions are properly set up.
Try this:

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

you will be asked for the root password, type it  and then try to edit the file.
Let's see what we get.

p.s. if you do not have nano then type pacman -Sy nano

Offline

#12 2006-08-07 18:12:27

arooaroo
Member
From: London, UK
Registered: 2005-01-13
Posts: 1,268
Website

Re: permission denied!

zagabar wrote:

But how come that I cannot open the files, just view them?

Surely it's because you're not logged in as 'root'.

Offline

#13 2006-08-07 18:34:34

Stinky
Member
From: The Colony, TX
Registered: 2004-05-28
Posts: 187

Re: permission denied!

arooaroo wrote:
zagabar wrote:

But how come that I cannot open the files, just view them?

Surely it's because you're not logged in as 'root'.

[root@myhost ~]# ls -l /etc/rc-conf 

Offline

#14 2006-08-07 18:51:20

arooaroo
Member
From: London, UK
Registered: 2005-01-13
Posts: 1,268
Website

Re: permission denied!

Stinky wrote:

[root@myhost ~]# ls -l /etc/rc-conf 

Oops! Managed to miss that.

The only other theory I can think of is that the partition is mounted as read-only. So regardless of being logged in as root, you still can't alter any thing.

Offline

#15 2006-08-07 19:03:26

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,694
Website

Re: permission denied!

Yes, either that or the root password is messed up. By running an editor like nano with su -c 'nano /etc/rc.conf'
I hope we can see if the passord holds "valid" from there the other option is the system is read-only.

Offline

#16 2006-08-07 19:38:31

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: permission denied!

arooaroo wrote:

The only other theory I can think of is that the partition is mounted as read-only.

First thing _I_ thought of!

Offline

#17 2006-08-08 12:05:26

zagabar
Member
Registered: 2006-08-05
Posts: 33

Re: permission denied!

When I type "su -c 'nano /etc/rc.conf'" I come into a text editing window, but it is empty. I can see the commands at the bottom of the screen, but where the text is supposed to be shown, there is no text.

How do I check if the partition is marked read only?

Offline

#18 2006-08-08 16:41:38

jaboua
Member
Registered: 2005-11-05
Posts: 634

Re: permission denied!

zagabar wrote:

When I type "su -c 'nano /etc/rc.conf'" I come into a text editing window, but it is empty. I can see the commands at the bottom of the screen, but where the text is supposed to be shown, there is no text.

How do I check if the partition is marked read only?

mount

If there is a RO in a paranthese behind the partition in the output, it's read only. But considering that you can't show the content in nano, I would rather guess on something else being wrong... Have you tried several text editors?

Offline

#19 2006-08-08 18:51:02

zagabar
Member
Registered: 2006-08-05
Posts: 33

Re: permission denied!

I have succeded to edit files with nano now but I still dont have permission if I try to open it normally.

Offline

#20 2006-08-08 22:33:14

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,694
Website

Re: permission denied!

What do you mean by "open it normally". If you were able to open the file with nano and edit it it means: 1. You do have "root powers" and they work as expected 2. The partition is not READ Only.

Perhaps we are not understanding what you are doing ... can you give us a "step by step" sort of guide to try to retrace your steps and understand the problem?

BTW, /etc/rc.conf is not editable by regular users only by root.

Offline

#21 2006-08-08 23:03:13

Snarkout
Member
Registered: 2005-11-13
Posts: 542

Re: permission denied!

Once you are logged in as root, please post the output of:

mount

env (mask any sensitive info from this command, like IPs)

id

Please also post any errors you get when trying to edit the file.


Unthinking respect for authority is the greatest enemy of truth.
-Albert Einstein

Offline

#22 2006-08-09 12:40:18

zagabar
Member
Registered: 2006-08-05
Posts: 33

Re: permission denied!

/dev/hdg3 on / type ext3 (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /proc/bus/usb type usbfs (rw)
none on /dev/pts type devpts (rw)
none on /dev/shm type tmpfs (rw)
/dev/hdg1 on /boot type ext2 (rw)

this is what I get when i type mount. I guess that the RW paranthesis stands for read write.
I get the message permission denied when i just type /etc/rc.conf like this.

[root@myhost]# /etc/rc.conf
bash: /etc/rc.conf: Permission denied

Offline

#23 2006-08-09 13:02:36

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: permission denied!

zagabar wrote:

[root@myhost]# /etc/rc.conf
bash: /etc/rc.conf: Permission denied

:shock: ... that means that you're not allowed to execute /etc/rc.conf.  This is normal.

If you want to edit the file, you must use an editor: nano, vim, emacs, vi, pica, etc...  You can't just type the filename at the prompt; that won't work because the configuration file is not executable.

Offline

#24 2006-08-09 13:20:10

zagabar
Member
Registered: 2006-08-05
Posts: 33

Re: permission denied!

oh... silly me. thakns for the help anyway >D

Offline

#25 2006-08-09 14:03:51

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: permission denied!

zagabar wrote:

silly me

:shock: Are you kidding?! I dunno maybe you used a different shell in the past but I can't imagine anyone trying to open a file without even using a command!  It was such a basic error it took nearly 30 posts for the problem to even be identified!  :cry:

Offline

Board footer

Powered by FluxBB