Hello,
I proceed with a fresh installation of Ghost (with a ghost super user account) and after create the ‘ghost’ account (procedure is the same like here : #676 ).
Launch ghost and control process with systemctl and all is fine.
But if i want to update ghost, it’s fails, there are somme errors :
ghostuser@zero:/var/www/ghost$ ghost update
Checking folder permissions
Checking file permissions
[Checking content folder ownership
Checking folder permissions
Message: Command failed: /bin/sh -c find ./ -type d ! -perm 775 ! -perm 755
find: ‘./content/.config’: Permission non accordée
./content/.config
Checking file permissions
Message: Command failed: /bin/sh -c find ./ -type f ! -path “./versions/*” ! -perm 664 ! -perm 644
find: ‘./content/.config’: Permission non accordée
Checking content folder ownership
Message: Command failed: /bin/sh -c find ./content ! -group ghost ! -user ghost
find: ‘./content/.config’: Permission non accordée
Debug Information:
OS: Debian, v9.4
Node Version: v8.11.1
Ghost-CLI Version: 1.7.2
Environment: production
Command: ‘ghost update’
Ghost Version (at /var/www/ghost): 1.22.5
The default permission :
ls -al /var/www/ghost/
total 28
drwxrwxr-x 5 ghostuser ghostuser 4096 mai 2 18:40 .
drwxr-xr-x 5 root root 4096 avril 25 23:11 …
-rw-r–r-- 1 ghostuser ghostuser 486 mai 2 18:40 config.production.json
drwxr-xr-x 8 ghost ghost 4096 mai 2 18:37 content
lrwxrwxrwx 1 ghostuser ghostuser 30 mai 2 18:38 current → /var/www/ghost/versions/1.22.5
-rw-r–r-- 1 ghostuser ghostuser 109 mai 2 18:43 .ghost-cli
drwxr-xr-x 3 ghostuser ghostuser 4096 mai 2 18:40 system
drwxr-xr-x 3 ghostuser ghostuser 4096 mai 2 18:38 versions
ls -al /var/www/ghost/content/.config/
total 12
drwx------ 3 ghost ghost 4096 mai 2 18:47 .
drwx------ 9 ghost ghost 4096 mai 2 18:47 …
drwx------ 2 ghost ghost 4096 mai 2 19:03 configstore
ls -al /var/www/ghost/content/.config/configstore/
total 12
drwx------ 2 ghost ghost 4096 mai 2 19:03 .
drwx------ 3 ghost ghost 4096 mai 2 18:47 …
-rw------- 1 ghost ghost 55 mai 2 18:47 update-notifier-npm.json
I proceed some modifications :
ghostuser@zero:/var/www/ghost$ sudo find ./ -type d -exec chmod 775 {} ;
ghostuser@zero:/var/www/ghost$ sudo find ./ ! -path “./versions/*” -type f -exec chmod 664 {} ;
ghostuser@zero:/var/www/ghost$ sudo chown -R ghost.ghostuser /var/www/ghost/content/.config
ls -al content/.config
total 12
drwxrwxr-x 3 ghost ghostuser 4096 mai 2 18:47 .
drwxrwxr-x 9 ghost ghost 4096 mai 2 18:47 …
drwxrwxr-x 2 ghost ghostuser 4096 mai 2 19:03 configstore
ls -al content/.config/configstore/update-notifier-npm.json
-rw-rw-r-- 1 ghost ghostuser 55 mai 2 18:47 content/.config/configstore/update-notifier-npm.json
And retry ghost update :
ghostuser@zero:/var/www/ghost$ ghost update
Running sudo command: systemctl is-active ghost_localhost
? Password [hidden]
Checking system Node.js version
Ensuring user is not logged in as ghost user
Checking if logged in user is directory owner
Checking current folder permissions
Checking folder permissions
Checking file permissions
Checking content folder ownership
Checking memory availability
Checking for available migrations
Checking for latest Ghost version
All up to date!
I think the default permission folder .config (and subdirectory and file) seems incorrect because if only ‘ghost’ can read and write then the ‘ghost super user’ doesn’t have any access and update failed.
It’s possible i do a error and if yes please indicate me where and how to fix this,
i try twice with fresh install and ghost update and same error.
Best regards.