Cannot write schema-dump-default.lock since config directory is not writable (Error: file_put_contents(/var/www/passbolt/config/Migrations/schema-dump-default.lock)

#1

Hi!

I have a problem while upgrading from 2.7.2 to the latest 2.8 version. Following the steps at the upgrade doc site, I am stuck at:

root@vault:/var/www/passbolt
# su -s /bin/bash -c "/var/www/passbolt/bin/cake passbolt migrate --backup" www-data

     ____                  __          ____
    / __ \____  _____ ____/ /_  ____  / / /_
   / /_/ / __ `/ ___/ ___/ __ \/ __ \/ / __/
  / ____/ /_/ (__  |__  ) /_/ / /_/ / / /
 /_/    \__,_/____/____/_.___/\____/_/\__/

 Open source password manager for teams
---------------------------------------------------------------
Saving backup file: /var/www/passbolt/tmp/cache/database/backup_1554187057.sql
Success: the database was saved on file!
---------------------------------------------------------------
 Running migration scripts.
---------------------------------------------------------------
using migration paths
 - /var/www/passbolt/config/Migrations
using seed paths
 - /var/www/passbolt/config/Seeds
using environment default
using adapter mysql
using database prod_passbolt

All Done. Took 0.0106s
using migration paths
 - /var/www/passbolt/config/Migrations
using seed paths
 - /var/www/passbolt/config/Seeds
Writing dump file `/var/www/passbolt/config/Migrations/schema-dump-default.lock`...
Warning Error: file_put_contents(/var/www/passbolt/config/Migrations/schema-dump-default.lock): failed to open stream: Permission denied in [/var/www/passbolt/vendor/cakephp/migrations/src/Command/Dump.php, line 105]

2019-04-02 06:37:38 Warning: Warning (2): file_put_contents(/var/www/passbolt/config/Migrations/schema-dump-default.lock): failed to open stream: Permission denied in [/var/www/passbolt/vendor/cakephp/migrations/src/Command/Dump.php, line 105]


An error occurred while writing dump file `/var/www/passbolt/config/Migrations/schema-dump-default.lock`
Cleared default cache
Cleared _cake_core_ cache
Cleared _cake_model_ cache

Any ideas?

0 Likes

#2

I will answer myself:

touch /var/www/passbolt/config/Migrations/schema-dump-default.lock
chown www-data:www-data /var/www/passbolt/config/Migrations/schema-dump-default.lock
1 Like

#3

@b4d we’ll update the minor release documentation. This file should indeed be made writable before a minor update.

1 Like

closed #4

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.

0 Likes