Raspcontrol issue with database.aptmnt file


3 posts
by Pirlouis » Sat Jul 13, 2013 8:52 am
Hi all,

I am facing a problem that is breaking me down :D
I am running raspbian, last version and up to date:

Code: Select all
 $ uname -a
Linux raspberrypi 3.6.11+ #474 PREEMPT Thu Jun 13 17:14:42 BST 2013 armv6l GNU/Linux


I installed lighttpd and it's running under www-data user:

Code: Select all
$ ps aux | grep lighttpd
www-data  2285  0.0  0.3   6760  1724 ?        S    10:33   0:00 /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf
pi        2584  0.0  0.2   3800   904 pts/0    S+   10:37   0:00 grep --color=auto lighttpd


I installed php too and it is running well:

Code: Select all
 $ ps aux | grep php
www-data  2299  0.0  1.1  19364  5060 ?        Ss   10:33   0:00 /usr/bin/php-cgi
www-data  2335  0.0  0.6  19364  3100 ?        S    10:33   0:00 /usr/bin/php-cgi
www-data  2336  0.0  0.7  19364  3228 ?        S    10:33   0:00 /usr/bin/php-cgi
www-data  2337  0.0  0.6  19364  3088 ?        S    10:33   0:00 /usr/bin/php-cgi
www-data  2338  0.0  0.4  19364  1940 ?        S    10:33   0:00 /usr/bin/php-cgi
pi        2676  0.0  0.2   3800   900 pts/0    S+   10:47   0:00 grep --color=auto php


The problem I found is when trying to use raspcontrol, I succesfully managed to acces the login page but can't login. When I try it, I get the following error:

Oups! Failed to open authentification file in /etc/raspcontrol/database.aptmnt


I thought first is was permission issue so I checked the directory raspcontrol:

Code: Select all
 $ ls -lrt /var/www/
total 8
drwxr-xr-x 7 www-data www-data 4096 juil.  4 19:33 raspcontrol
-rw-r--r-- 1 www-data www-data 3585 juil. 10 21:47 index.lighttpd.html


In raspcontrol directory:

Code: Select all
 $ ls -lrt /var/www/raspcontrol/
total 116
-rw-r--r-- 1 www-data www-data  1184 juil.  4 19:33 README.md
-rw-r--r-- 1 www-data www-data 61265 juil.  4 19:33 raspcontrol-home.png
drwxr-xr-x 2 www-data www-data  4096 juil.  4 19:33 pages
-rw-r--r-- 1 www-data www-data   944 juil.  4 19:33 login.php
-rw-r--r-- 1 www-data www-data 19369 juil.  4 19:33 LICENCE
drwxr-xr-x 2 www-data www-data  4096 juil.  4 19:33 lib
drwxr-xr-x 2 www-data www-data  4096 juil.  4 19:33 js
-rw-r--r-- 1 www-data www-data  3625 juil.  4 19:33 index.php
drwxr-xr-x 2 www-data www-data  4096 juil.  4 19:33 img
drwxr-xr-x 2 www-data www-data  4096 juil.  4 19:33 css
-rw-r--r-- 1 www-data www-data   642 juil.  4 19:33 config.php


The fil itself:

Code: Select all
 ls -lrt /etc/raspcontrol/
total 4
-rwxr-xr-x 1 www-data www-data 65 juil. 10 22:11 database.aptmnt


/etc/raspcontrol directory:

Code: Select all
 $ ls -lrt /etc | grep raspcontrol
drwxr-xr-x  2 www-data www-data  4096 juil. 10 22:11 raspcontrol


Can you tell me why I get such error. According to me, everything is well setup.
May I miss something ?

Thank you in advance.
Posts: 1
Joined: Sat Jul 13, 2013 8:39 am
by JorisGvK » Fri Jul 26, 2013 8:00 pm
From the wiki installation guide:
(https://github.com/imjacobclark/Raspcon ... tion-Guide)

You have to create a json format file in /etc/raspcontrol named database.aptmnt. This file contains your username and password.
1 Create the folder with mkdir /etc/raspcontrol
2 Create the file with nano /etc/raspcontrol/database.aptmnt

Add the following informations:
{
"user": "yourName",
"password": "yourPassword"
}

You need now to change the right in order that Raspcontrol can use it:
chmod 777 /etc/raspcontrol
chmod 777 /etc/raspcontrol/database.aptmnt

Hope this helps.
Posts: 1
Joined: Fri Jul 26, 2013 7:53 pm
by ashobe » Thu Dec 26, 2013 6:12 pm
Still cannot get beyond the username and password page... not a total newbie but this is frustrating

Any other suggestions.
Posts: 3
Joined: Sun Dec 15, 2013 7:01 pm