Bonjour à tous,
j'ai suivi ce tuto sur une 18.04 hébergée (VPS).
https://doc.ubuntu-fr.org/mrtg
Je suis étonné de ne pas pouvoir effectuer la commande
cfgmaker @ > /etc/mrtg.cfg
sans avoir un Permission Denied, même avec sudo.
ls -la donne notamment:
-rwxrwxr-x 1 root root 547 Jan 24 09:37 mrtg.cfg
-rw-r--r-- 1 root root 542 Jan 24 09:37 mrtg.cfg.origine
Un
chmod 775 mrtg.cfg
mène au même résultat.
Un
chmod 777 mrtg.cfg
mène à pouvoir passer la commande, qui donne à ce moment :
sudo cfgmaker public@localhost > /etc/mrtg.cfg
--base: Get Device Info on public@localhost:
--base: Vendor Id: Unknown Vendor - 1.3.6.1.4.1.8072.3.2.10
--base: Populating confcache
--base: Get Interface Info
--base: Walking ifIndex
--snpd: public@localhost: -> 1 -> ifIndex = 1
--snpd: public@localhost: -> 2 -> ifIndex = 2
--base: Walking ifType
--snpd: public@localhost: -> 1 -> ifType = 24
--snpd: public@localhost: -> 2 -> ifType = 6
--base: Walking ifAdminStatus
--snpd: public@localhost: -> 1 -> ifAdminStatus = 1
--snpd: public@localhost: -> 2 -> ifAdminStatus = 1
--base: Walking ifOperStatus
--snpd: public@localhost: -> 1 -> ifOperStatus = 1
--snpd: public@localhost: -> 2 -> ifOperStatus = 1
--base: Walking ifMtu
--snpd: public@localhost: -> 1 -> ifMtu = 65536
--snpd: public@localhost: -> 2 -> ifMtu = 1500
--base: Walking ifSpeed
--snpd: public@localhost: -> 1 -> ifSpeed = 10000000
--snpd: public@localhost: -> 2 -> ifSpeed = 0
ubuntu@b2-7-sbg5:/etc$
Puis on recommence avec /var/www/html/index.html :
sudo indexmaker /etc/mrtg.cfg > /var/www/html/mrtg/index.html
-bash: /var/www/html/mrtg/index.html: Permission denied
Etrangement contournable par
chmod -R 777 /var/www/html/mrtg/
Puis ça passe, mais biensûr, on obtient un nouveau truc bizarre :
sudo indexmaker /etc/mrtg.cfg > /var/www/html/mrtg/index.html
ERROR: CFG Error in "workdir", file /etc/mrtg.cfg line 21: Working directory /var/www/mrtg does not exist
Alors je regarde dans /etc/mrtg.cfg, dans lequel je rappelle on est censé modifier le WorkDir pour /var/www/html/mrtg
et là, stupeur, il est redevenu
# for Debian
WorkDir: /var/www/mrtg
Donc je le modifie à la mimine, et je redémarre apache2; puis quand je vais sur l'IP du VPS pour voir mon index.html, j'ai apache qui dit bienvenue, tout va bien.
Toutefois, lorsque que je vais dans /mrtg/index.html, page blanche youpi !