PDA

Bekijk de volledige versie : Creating /etc/protocols /xinetd



xmeister
14-11-2007, 06:55
I'm trying to use xinetd and it won't start any services without the /etc/protocols file. I can't create the /etc/protocols, even logged in as root. I get a permissions denied error trying to vi or copy files into /etc. I can't create a sym link to a seperate file either. I assume this maybe a Linux (I'm relatively new to Linux) quirk or something is wrong with the box..

Thanks ahead of time for any help..

X

back2basic
14-11-2007, 07:52
I'm trying to use xinetd and it won't start any services without the /etc/protocols file. I can't create the /etc/protocols, even logged in as root. I get a permissions denied error trying to vi or copy files into /etc. I can't create a sym link to a seperate file either. I assume this maybe a Linux (I'm relatively new to Linux) quirk or something is wrong with the box..

Thanks ahead of time for any help..

X

Its problable read only.
maybe you can try creating /opt/etc/protocols and symlink that to /etc/protocols ( It's just a guess)

xmeister
14-11-2007, 09:27
Thx for reply.

I tried that, created a protocols in tmp (cause that's where most of the system files such as passwd/group/fstab are linked from) and it didn't work. I tried the following statement:
ln -s /tmp/protocols /etc/protocols
and got the following error:
creating symbolic link `/etc/protocols': Operation not permitted

back2basic
20-11-2007, 23:04
look here

http://wl500g.info/showpost.php?p=69884&postcount=3

xmeister
21-11-2007, 07:03
Wow. It actually worked, I was starting to tear my hair out after trying various things, I'm relatively new to Linux so never sure if the next command I typed would wipe out the system :). I was trying to follow the idea that the root is mounted read only (and I guess some of it is) and tried mounting as rw, but according to mount/fstab file it already is.

Anyways:
Found a directory to put it (which happened to be /shares/MYVOLUME1/etc)
cp /etc . -rd
The r is for recursive and d to keep the links, this seemed to work.
Added the file (protocols) to the directory and then:
mount -o bind /shares/MYVOLUME1/etc/etc /etc

Then started xinetd, which worked - which allowed me to start swat for Samba - which also seems to work.

Now just need to work with the config for a few weeks and pressure test it, and who knows, might be a new entry on your site for updating Samba :).

Regards,

X