Problems with permission, I need help, I am 2 days trying to solve

Problems with permission, I need help, I am 2 days trying to solve.

Debug Information:
OS: Ubuntu, v18.04.4 LTS
Node Version: v10.20.1
Ghost Version: 3.13.4
Ghost-CLI Version: 1.13.1
Environment: production
Command: ‘ghost doctor’

I’ve noticed the command listed here several times

ubuntu@ip-172-26-5-222:/var/www/ghost$ ghost doctor
:heavy_check_mark: Checking system Node.js version
:heavy_check_mark: Checking logged in user
:heavy_check_mark: Ensuring user is not logged in as ghost user
:heavy_multiplication_x: Checking if logged in user is directory owner
:heavy_multiplication_x: Checking current folder permissions
:heavy_check_mark: Checking operating system compatibility
:heavy_check_mark: Checking for a MySQL installation

  • sudo systemctl is-active ghost_blog-becinteligencia-com-br
    :heavy_check_mark: Validating config
    :heavy_check_mark: Checking folder permissions
    :heavy_check_mark: Checking file permissions
    :heavy_check_mark: Checking content folder ownership
    :heavy_check_mark: Checking memory availability
    :heavy_check_mark: Checking binary dependencies
    One or more errors occurred.
  1. Checking if logged in user is directory owner
    Message: Your user does not own the directory /var/www/ghost and is also not a member of the owning group. You must either log in with the user that owns the directory or add your user to the owning group. Help: https://ghost.org/docs/install/ubuntu/#create-a-new-user-

  2. Checking current folder permissions
    Message: The directory /var/www/ghost is not writable by your user. You must grant write access and try again. Help: https://ghost.org/docs/install/ubuntu/#create-a-directory

I need help, please.

run the below command

sudo chwon $USER:$USER /var/www/ghost

Replace /var/www/ghost with your ghost folder.

It should solve the problem… Let me know if doesn’t

Was this when you tried to update Ghost? We do have a guide on this:

It sounds like you’re not logged in to your server as the user you used to install Ghost.

Did you install using the DO one-click or following our guide or some other way?

1 Like

Hi Hanna, how are you? I walk you through this link https://ghost.org/docs/install/ubuntu/

Hi David, how are you?

I did the update as requested in the documentation, see the return. Can you help me?

Last login: Thu Apr 23 11:52:59 2020 from 179.212.91.104
ubuntu@ip-172-26-5-222:~ sudo su - bec bec@ip-172-26-5-222:~ cd /var/www/ghost
bec@ip-172-26-5-222:/var/www/ghost$ ghost update

  • sudo systemctl is-active ghost_blog-becinteligencia-com-br
    ? Sudo Password [hidden]
    :heavy_check_mark: Checking system Node.js version
    :heavy_check_mark: Ensuring user is not logged in as ghost user
    :heavy_multiplication_x: Checking if logged in user is directory owner
    :heavy_multiplication_x: Checking current folder permissions
    :heavy_check_mark: Checking folder permissions
    :heavy_check_mark: Checking file permissions
    :heavy_check_mark: Checking content folder ownership
    :heavy_check_mark: Checking memory availability
    One or more errors occurred.
  1. Checking if logged in user is directory owner > Message: Your user does not own the directory /var/www/ghost and is also not a member of the owning group. You must either log in with the user that owns the directory or add your user to the owning group.

  2. Checking current folder permissions > Message: The directory /var/www/ghost is not writable by your user. You must grant write access and try again.

Debug Information:
OS: Ubuntu, v18.04.4 LTS
Node Version: v10.20.1
Ghost Version: 3.13.4
Ghost-CLI Version: 1.13.1
Environment: production
Command: ‘ghost update’

Try running ghost doctor to check your system for known issues.

If you followed our guide then in this step you created a user.

Then you logged in as that user with su - <user>

You need to login as that user whenever you run any ghost xxx commands.

Hi Hana, thanks for the reply.

Below are answers to one of your questions above.

My root is ubuntu

And the user is the bec where I did the installation.

ubuntu@ip-172-26-5-222:~ sudo su - bec bec@ip-172-26-5-222:~ cd /var/www/ghost
bec@ip-172-26-5-222:/var/www/ghost$ ghost update

  • sudo systemctl is-active ghost_blog-becinteligencia-com-br
    ? Sudo Password [hidden]
    :heavy_check_mark: Checking system Node.js version
    :heavy_check_mark: Ensuring user is not logged in as ghost user
    :heavy_multiplication_x: Checking if logged in user is directory owner
    :heavy_multiplication_x: Checking current folder permissions
    :heavy_check_mark: Checking folder permissions
    :heavy_check_mark: Checking file permissions
    :heavy_check_mark: Checking content folder ownership
    :heavy_check_mark: Checking memory availability
    One or more errors occurred.
  1. Checking if logged in user is directory owner > Message: Your user does not own the directory /var/www/ghost and is also not a member of the owning group. You must either log in with the user that owns the directory or add your user to the owning group.
  2. Checking current folder permissions > Message: The directory /var/www/ghost is not writable by your user. You must grant write access and try again.

Debug Information:
OS: Ubuntu, v18.04.4 LTS
Node Version: v10.20.1
Ghost Version: 3.13.4
Ghost-CLI Version: 1.13.1
Environment: production
Command: ‘ghost update’

Try running ghost doctor to check your system for known issues.

I have not yet acted on your guidance and I will do it again. OK!

But see above the question of users, which you recommend me to perform the installation again.

I do NOT recommend you perform the install again.

I recommend you switch to the correct user - the user who owns the ghost folder.

ls -al /var/www/ghost will tell you who owns the ghost folder.

Hana, thanks.

Here is information from the command you requested. Is there something wrong that I did, can you help me, please.

Last login: Thu Apr 23 16:44:58 2020 from 179.212.91.104
ubuntu@ip-172-26-5-222:~$ ls -al /var/www/ghost
total 28
drwxrwxr-x 5 ghost ghost 4096 Apr 23 01:24 .
drwxr-xr-x 4 root root 4096 Apr 23 01:19 …
-rw-rw-r-- 1 bec bec 101 Apr 23 02:59 .ghost-cli
-rw-rw-r-- 1 bec bec 511 Apr 23 02:47 config.production.json
drwxrwxr-x 8 ghost ghost 4096 Apr 23 01:20 content
lrwxrwxrwx 1 bec bec 30 Apr 23 01:21 current -> /var/www/ghost/versions/3.13.4
drwxrwxr-x 4 bec bec 4096 Apr 23 01:24 system
drwxrwxr-x 3 bec bec 4096 Apr 23 01:20 versions

Hanna, you are helping me a lot now the permission error I managed to overcome. Now the error is another one see below.

:heavy_multiplication_x: Starting Ghost: blog-becinteligencia-com-br
A SystemError occurred.

Message: Systemd process manager has not been set up or is corrupted.
Help: Run ghost setup linux-user systemd and try again.

What can it be? Can you help me please?

I uninstalled Ghost and installed it again and it is now working. I want to thank you for your support, thank you very much.