LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-11-2010, 04:23 AM   #1
arjukjan84
LQ Newbie
 
Registered: Dec 2010
Posts: 1

Rep: Reputation: 0
can't open etc/network/interfaces : permission denied or something?


hi i can't apen etc/network/interfaces file comes some permission denied
what can I do ??
 
Old 12-11-2010, 02:05 PM   #2
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
Please create your own thread for your issue in the future.

I have moved your post to a thread of its own, so that your issue remains separate from that of the creator of the other thread. This makes it easier for LQ members to help each of you.

Now, about your problem: What user are you running as, when you try to open the file? It is extremely likely the file is owned by root, and not readable or editable by a non-root user.

You did not tell us what OS you are using (you should tell us this), but if it's an Ubuntu or Mint type of OS, you probably want to use `sudo`. If it's a different OS (Like RH or CentOS or SuSE maybe), then probably you want to use `su` and become root, then edit the file.

If these ideas fail, then show us the EXACT text, copied from your terminal, when you try to run your editor command, or if you're using some GUI editor, tell us the EXACT error that appears in the dialog box.
 
Old 12-11-2010, 02:10 PM   #3
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
Quote:
Originally Posted by arjukjan84 View Post
hi i can't apen etc/network/interfaces file comes some permission denied
what can I do ??
If you are typing the path exactly as you typed it here then you are missing the leading / character.
Code:
cat /etc/network/interfaces
Actually that should result in a file not found error unless your were positioned in the root directory.

If you are still having trouble then find out what permissions are on that file.

Code:
ls -lhd /etc
ls -lhd /etc/network
ls -lh /etc/network/interfaces
Post the results here.

And, you should always state which distribution and version you are using. Different distributions have different security settings.

Last edited by stress_junkie; 12-11-2010 at 02:11 PM.
 
Old 04-03-2013, 09:54 AM   #4
mrgkmn
LQ Newbie
 
Registered: Apr 2013
Posts: 3

Rep: Reputation: Disabled
Quote:
Originally Posted by stress_junkie View Post
Code:
ls -lhd /etc
ls -lhd /etc/network
ls -lh /etc/network/interfaces
Post the results here.

And, you should always state which distribution and version you are using. Different distributions have different security settings.
i got same error.cant save file.my system is debian

Code:
root@xen:~# ls -lhd /etc
drwxr-xr-x 97 root root 4.0K Apr  3 16:32 /etc
root@xen:~# ls -lhd /etc/network
drwxr-xr-x 7 root root 4.0K Apr  3 16:45 /etc/network
root@xen:~# ls -lh /etc/network/interfaces
-rw-r--r-- 1 root root 347 Apr  3 15:21 /etc/network/interfaces
 
Old 04-03-2013, 10:13 AM   #5
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,286

Rep: Reputation: 1384Reputation: 1384Reputation: 1384Reputation: 1384Reputation: 1384Reputation: 1384Reputation: 1384Reputation: 1384Reputation: 1384Reputation: 1384
As explained above, in order to edit/save that file, you need to be logged in as root user.
 
Old 04-03-2013, 10:35 AM   #6
mrgkmn
LQ Newbie
 
Registered: Apr 2013
Posts: 3

Rep: Reputation: Disabled
look that root@xen im logged in root
there is another problem
 
Old 04-03-2013, 11:04 AM   #7
mddnix
Member
 
Registered: Mar 2013
Distribution: Redhat, Ubuntu
Posts: 525

Rep: Reputation: 141Reputation: 141
Quote:
Originally Posted by arjukjan84 View Post
hi i can't apen etc/network/interfaces file comes some permission denied
  1. are you not able to open the file at all, or you can open the file - but cannot save?
  2. are you by any chance trying to edit the file while in rescue mode?

cause once while i was trying to save /etc/fstab while in rescue mode, i could not save file. then i tried this. it solved everything. my distribution is CentOS though

Last edited by mddnix; 04-03-2013 at 11:13 AM.
 
Old 04-03-2013, 11:47 AM   #8
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
Can you post the dialogue from the terminal showing what command you gave and what the system responded with.
jdk
 
Old 04-04-2013, 06:45 AM   #9
mrgkmn
LQ Newbie
 
Registered: Apr 2013
Posts: 3

Rep: Reputation: Disabled
finaly solved
im try this command before editing:

chattr -i /etc/network/interfaces
 
Old 04-04-2013, 11:22 PM   #10
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
Quote:
Originally Posted by mrgkmn View Post
finaly solved
im try this command before editing:

chattr -i /etc/network/interfaces
Then please use the Thread Tools (above your first post) to mark this thread as "solved".
thanks,
jdk
 
Old 11-13-2014, 05:58 PM   #11
Croock
LQ Newbie
 
Registered: Nov 2014
Posts: 2

Rep: Reputation: Disabled
Unhappy Same problem

Hi, I'm having the same problem, but even whit th comand chattr -i /etc/network/interfaces i have the same result.

This is what i got;

omar@aprovisionamiento:~$ su
Contraseña:
root@aprovisionamiento:/home/omar# whoami
root
root@aprovisionamiento:/home/omar# /etc/network/interfaces
bash: /etc/network/interfaces: Permiso denegado
root@aprovisionamiento:/home/omar#

I tried this;

root@aprovisionamiento:/home/omar# su
root@aprovisionamiento:/home/omar# whoami
root
root@aprovisionamiento:/home/omar# cat /etc/network/interfaces
# 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
allow-hotplug eth0
#NetworkManager#iface eth0 inet dhcp




x
X
root@aprovisionamiento:/home/omar#

But I don get any information after eth0 inet dhcp

Could someone tell me what I'm doing wrong?
 
Old 11-13-2014, 06:10 PM   #12
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,487

Rep: Reputation: 390Reputation: 390Reputation: 390Reputation: 390
Quote:
Could someone tell me what I'm doing wrong?
Tagging on to old and unrelated threads and double-posting...
https://www.linuxquestions.org/quest...an-4175525342/
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mplayer: Can't open /dev/fb0: Permission denied jojoii Linux - Software 2 09-21-2008 05:56 PM
Windows Network Denied Permission bensebnem Linux - Networking 5 04-22-2008 03:26 AM
open for write: permission denied zechdc Linux - Server 2 01-02-2008 06:13 AM
'permission denied" inspite of right permission flags on network drive anirudhvij Linux - Enterprise 8 05-22-2007 05:57 AM
cannot open shared object file: Permission denied cchristian Linux - Software 5 07-30-2005 10:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration