LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Permission denied as root (https://www.linuxquestions.org/questions/linux-server-73/permission-denied-as-root-748028/)

bowbalitic 08-16-2009 10:51 PM

Permission denied as root
 
I just finished installing Ubuntu server 9.4 for my home network and I've already hit a roadblock. :)

I'm fairly new to Linux, but I thought that this would be a good learning tool. So please bare with my stupidity.

I've been following this how to http://www.howtoforge.com/ubuntu-home-fileserver and all has gone pretty well until I tried to set the ip to a static ip (Top of page 3 on the how to) I am trying to locate the directory /etc/network/interfaces when I try to access it it tells me permission denied and when I try to CD to it it says it "Not a directory".

Also, when I PWD it says I'm in /root and when I ls and li (installed limo) nothing shows up. When I ls/li /etc a list show up including "networks" but when I li/ls /etc/networks nothing shows up.

I know that this might be a pretty far above my head, but I'm just doing this to learn. I don't need it to work any time soon.

As always thanks for your help.

I couldn't find any, but if there is a thread that solves this problem could you please post a link an delete this one.

jschiwal 08-16-2009 10:56 PM

Quote:

ls/li /etc
This should be "ls -l /etc". If you want to see the inodes of files then "ls -li /etc.

also /etc/network/interfaces is a file, not a directory.

Ubuntu is configured with the root user disabled. That could account for the permission denied. Use "sudo" to run commands as root.

bowbalitic 08-16-2009 11:36 PM

I was logged in as root. The first thing I did was sudo passwd root and set password, then I logged in as root.So how would I change items in the file? I need to give the server a static ip. The how to is saying I need to edit /etc/networks/interfaces, these are the cmds given.

"# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.0.100
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1"

Uncle_Theodore 08-16-2009 11:41 PM

Just use one of the editors you've installed with the distribution.

emacs /etc/network/interfaces
vi /etc/network/interfaces
nano /etc/network/interfaces

or any GUI-based text editors, like

gedit /etc/network/interfaces

would do.

bowbalitic 08-16-2009 11:55 PM

Ok, I'll try, but ubuntu server doesn't have gui right? Any way, thanks for your help I'll see how it works out.

bowbalitic 08-21-2009 03:55 PM

Thank you for your help, I understand what you mean now.


All times are GMT -5. The time now is 08:39 PM.