SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2013-02-07 17:41:56

VDP76
#! Bean Roaster
Registered: 2012-04-12
Posts: 838

permission issue with interfaces

hi,

I have set up my connections disabling network-manager and configuring /etc/network/interfaces. I have also read-protected the file, I guess with chmod 0600, but I am not sure though..

mattia@ThinkCBW:~$ ls -l /etc/network/interfaces 
-rw-r----- 1 root root 745 Feb  7  2013 /etc/network/interfaces

now, if I want to type

sudo ifdown [interface]

and I hit Tab for autocompletion I get this

sudo ifdown ethsed: can't read /etc/network/interfaces: Permission denied
^C
mattia@ThinkCBW:~$ sudo ifdown wlsed: can't read /etc/network/interfaces: Permission denied
^C

however if I type myself the name of the interface, the command work as expected.

is it a normal behaviour, is there a way around it without disclosing the content of the file?
thanks


#!#!#! Forum etiquette #!#!#!
Are you a new member!? Have you introduced yourself?!
CLI basics | LVM | smxi | chrooting | multiarch

Offline

Help fund CrunchBang, donate to the project!

#2 2013-02-07 19:31:19

fatmac
#! Die Hard
Registered: 2012-11-14
Posts: 1,948

Re: permission issue with interfaces

My /etc/network/interfaces file is 644 - needs to be readable by all, presumably, give it a go.


Linux since 1999
Currently:  AntiX, & Crunchbang.
A good general beginners book for Linux :- http://rute.2038bug.com/index.html.gz
A good Debian read :- http://debian-handbook.info/get/now/

Offline

#3 2013-02-07 19:44:53

xaos52
The Good Doctor
From: Planet of the @s
Registered: 2011-06-24
Posts: 4,602

Re: permission issue with interfaces

OP is right. /etc/network/interfaces should not be world readable as it can contain sensible information.
Here are my permissions for dir /etc/network

  drwxr-xr-x   6 root root  4096 Feb  7 19:36 .            <---
  drwxr-xr-x 133 root root 12288 Feb  7 19:29 ..
  drwxr-xr-x   2 root root  4096 Nov  8 09:25 if-down.d
  drwxr-xr-x   2 root root  4096 Jan 11 10:34 if-post-down.d
  drwxr-xr-x   2 root root  4096 Jan 11 10:34 if-pre-up.d
  drwxr-xr-x   2 root root  4096 Feb  4 13:48 if-up.d
  -rw-r-----   1 root root   294 Dec  5 14:52 interfaces
  -rw-r-----   1 root root   489 Dec  5 13:30 interfaces.bak
  lrwxrwxrwx   1 root root    12 Sep 18 09:42 run -> /run/network

Perhaps permissions for dir /etc/network itself are not correct?

Offline

#4 2013-02-07 23:53:38

VDP76
#! Bean Roaster
Registered: 2012-04-12
Posts: 838

Re: permission issue with interfaces

Dr. Xaos, I have the same permissions

drwxr-xr-x 2 root root 4.0K Nov 16 20:21 if-down.d/
drwxr-xr-x 2 root root 4.0K Nov 14 23:55 if-post-down.d/
drwxr-xr-x 2 root root 4.0K Nov 14 23:55 if-pre-up.d/
drwxr-xr-x 2 root root 4.0K Dec  3 23:15 if-up.d/
-rw-r----- 1 root root  747 Feb  7 19:40 interfaces
lrwxrwxrwx 1 root root   12 Sep  8 02:17 run -> /run/network/

I have even checked el_koraco's tutorial: he suggests chmod 0600, so I would suppose I used that..

anyway I use aliases for the various ifup/idown command so this is not a big issue...but I am curious on the reason of this behaviour..


#!#!#! Forum etiquette #!#!#!
Are you a new member!? Have you introduced yourself?!
CLI basics | LVM | smxi | chrooting | multiarch

Offline

#5 2013-02-08 10:18:31

xaos52
The Good Doctor
From: Planet of the @s
Registered: 2011-06-24
Posts: 4,602

Re: permission issue with interfaces

Post output of

ls -dl /etc/network

to see the permissions for the dir itself

Offline

#6 2013-02-08 18:33:54

VDP76
#! Bean Roaster
Registered: 2012-04-12
Posts: 838

Re: permission issue with interfaces

here it is...

mattia@ThinkCBW:~$ ls -dl /etc/network
drwxr-xr-x 6 root root 4.0K Feb  7 19:40 /etc/network/

#!#!#! Forum etiquette #!#!#!
Are you a new member!? Have you introduced yourself?!
CLI basics | LVM | smxi | chrooting | multiarch

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo