whst
February 13, 2018, 2:48pm
1
Hello,
I am trying to install passbolt on raspbian stretch with nginx and PHP 7.0 using this guide: https://medium.com/passbolt/passbolt-on-debian-8-71-from-scratch-4438dad18908
Everything works till this command:
gpg --armor --export-secret-keys passbolt@passbolt.dev > /var/www/passbolt/app/Config/gpg/serverkey.private.asc
gpg --armor --export passbolt@passbolt.dev > /var/www/passbolt/app/Config/gpg/serverkey.asc
I am getting an error:
-bash: /var/www/passbolt/app/Config/gpg/serverkey.asc: Permission denied
Any ideas what am I doing wrong? Thank you.
diego
February 13, 2018, 3:42pm
2
Hi @whst !
Those are 2 commands:
gpg --armor --export-secret-keys passbolt@passbolt.dev > /var/www/passbolt/app/Config/gpg/serverkey.private.asc
And
gpg --armor --export passbolt@passbolt.dev > /var/www/passbolt/app/Config/gpg/serverkey.asc
Might be a dumb question but are you root or any other user with write permissions on /var/www/passbolt?
whst
February 13, 2018, 3:52pm
3
Well dumb questions are good questions as actually I am pretty new with all this Linux stuff
I use SSH and I write “sudo” before the commands, doesn’t that cover permissions stuff?
diego
February 13, 2018, 4:03pm
4
Yeah, problem is that you are executing a redirection on that command as well. I guess you did this:
sudo gpg --armor --export-secret-keys passbolt@passbolt.dev > /var/www/passbolt/app/Config/gpg/serverkey.private.asc
Which just elevates privileges for the gpg part and the redirection is being performed as regular user. Considering you created your gpg keys as root user and you want to export root keys to /var/www/passbolt/app/Config/gpg/
:
You have plenty of alternatives here like for instance:
sudo gpg --armor --export-secret-keys passbolt@passbolt.dev | sudo tee /var/www/passbolt/app/Config/gpg/serverkey.private.asc
whst
February 13, 2018, 5:42pm
5
Thank you very much @diego , it worked now and your explanation helped me to understand what I did wrong
Unfortunately, next problem came up:
sudo su -s /bin/bash -c “app/Console/cake install --no-admin” www-data
Cake Schema Shell
Error: Database connection “Mysql” is missing, or could not be created.
#0 /var/www/passbolt/lib/Cake/Model/Datasource/DboSource.php(269): Mysql->connect()
#1 /var/www/passbolt/lib/Cake/Model/ConnectionManager.php(105): DboSource->__construct(Array)
#2 /var/www/passbolt/app/Console/Command/SchemaShell.php(317): ConnectionManager::getDataSource(‘default’)
#3 /var/www/passbolt/app/Console/Command/SchemaShell.php(251): SchemaShell->_create(Object(AppSchema), NULL)
#4 /var/www/passbolt/lib/Cake/Console/Shell.php(458): SchemaShell->create()
#5 /var/www/passbolt/lib/Cake/Console/ShellDispatcher.php(219): Shell->runCommand(‘create’, Array)
#6 /var/www/passbolt/lib/Cake/Console/Shell.php(399): ShellDispatcher->dispatch()
#7 /var/www/passbolt/app/Console/Command/InstallShell.php(312): Shell->dispatchShell(‘schema create -…’)
#8 /var/www/passbolt/app/Console/Command/InstallShell.php(133): InstallShell->schema()
#9 /var/www/passbolt/lib/Cake/Console/Shell.php(461): InstallShell->main()
#10 /var/www/passbolt/lib/Cake/Console/ShellDispatcher.php(219): Shell->runCommand(’–no-admin’, Array)
#11 /var/www/passbolt/lib/Cake/Console/ShellDispatcher.php(66): ShellDispatcher->dispatch()
#12 /var/www/passbolt/app/Console/cake.php(52): ShellDispatcher::run(Array)
#13 {main}
I found out that it might be problem with typo in database.php, but when I put this script in my index.php it works fine (Connected successfully):
<?php
$servername = "localhost";
$database = "passbolt";
$username = "passbolt";
$password = "myPasswordHere";
// Create connection
$conn = new mysqli($servername, $username, $password);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
echo "Connected successfully";
?>
remy
February 14, 2018, 3:29am
6
@whst please create a different issue for the mysql problem so that other people with similar issue can also see the solution.
Thanks,
system
Closed
February 19, 2018, 3:30am
7
This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.