You are not logged in.
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
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
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
I see. In that case I would think that something went wrong with the FTP installation. You may need to re-install.
Offline
OK, im going to try that now...
Offline
Nope, i still havent got permission.
Offline
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
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
Is this the way it should be?
Yes
Offline
But how come that I cannot open the files, just view them?
Offline
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
But how come that I cannot open the files, just view them?
Surely it's because you're not logged in as 'root'.
Offline
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
[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
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
The only other theory I can think of is that the partition is mounted as read-only.
First thing _I_ thought of!
Offline
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
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
I have succeded to edit files with nano now but I still dont have permission if I try to open it normally.
Offline
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
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
/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
[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
oh... silly me. thakns for the help anyway >D
Offline
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