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

**URL:** <https://forum.ghost.org/t/problems-with-permission-i-need-help-i-am-2-days-trying-to-solve/13776>\
**Category:** Developer help\
**Created:** [April 23, 2020, 1:44pm UTC](https://forum.ghost.org/t/problems-with-permission-i-need-help-i-am-2-days-trying-to-solve/13776 "2020-04-23T13:44:48Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Carlos\_Brandao](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/carlos_brandao/32/7495_2.png) [@Carlos\_Brandao](https://forum.ghost.org/u/Carlos_Brandao)\
**Post date:** [April 23, 2020, 1:44pm UTC](https://forum.ghost.org/t/problems-with-permission-i-need-help-i-am-2-days-trying-to-solve/13776/1 "2020-04-23T13:44:48Z")

</div>

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  
✔ Checking system Node.js version  
✔ Checking logged in user  
✔ Ensuring user is not logged in as ghost user  
✖ Checking if logged in user is directory owner  
✖ Checking current folder permissions  
✔ Checking operating system compatibility  
✔ Checking for a MySQL installation

- sudo systemctl is-active ghost\_blog-becinteligencia-com-br  
✔ Validating config  
✔ Checking folder permissions  
✔ Checking file permissions  
✔ Checking content folder ownership  
✔ Checking memory availability  
✔ 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: [How to install & setup Ghost on Ubuntu 16.04, 18.04, 20.04 or 22.04](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: [How to install & setup Ghost on Ubuntu 16.04, 18.04, 20.04 or 22.04](https://ghost.org/docs/install/ubuntu/#create-a-directory)

I need help, please.

---

<div class="post-metadata">

**Author:** ![inoryum](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/inoryum/32/11866_2.png) [@inoryum](https://forum.ghost.org/u/inoryum)\
**Post date:** [April 23, 2020, 2:07pm UTC](https://forum.ghost.org/t/problems-with-permission-i-need-help-i-am-2-days-trying-to-solve/13776/2 "2020-04-23T14:07:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![DavidDarnes](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/daviddarnes/32/3533_2.png) [@DavidDarnes](https://forum.ghost.org/u/DavidDarnes)\
**Post date:** [April 23, 2020, 2:08pm UTC](https://forum.ghost.org/t/problems-with-permission-i-need-help-i-am-2-days-trying-to-solve/13776/3 "2020-04-23T14:08:44Z")

</div>

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

> **[Ghost Docs](https://ghost.org/docs/update/)**
>
> Everything you need to know about working with the Ghost professional publishing platform.

---

<div class="post-metadata">

**Author:** ![Hannah](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/hannah/32/22_2.png) [@Hannah](https://forum.ghost.org/u/Hannah)\
**Post date:** [April 23, 2020, 2:25pm UTC](https://forum.ghost.org/t/problems-with-permission-i-need-help-i-am-2-days-trying-to-solve/13776/4 "2020-04-23T14:25:34Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Carlos\_Brandao](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/carlos_brandao/32/7495_2.png) [@Carlos\_Brandao](https://forum.ghost.org/u/Carlos_Brandao)\
**Post date:** [April 23, 2020, 4:43pm UTC](https://forum.ghost.org/t/problems-with-permission-i-need-help-i-am-2-days-trying-to-solve/13776/5 "2020-04-23T16:43:38Z")

</div>

Hi Hanna, how are you? I walk you through this link [How to install & setup Ghost on Ubuntu 16.04, 18.04, 20.04 or 22.04](https://ghost.org/docs/install/ubuntu/)

---

<div class="post-metadata">

**Author:** ![Carlos\_Brandao](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/carlos_brandao/32/7495_2.png) [@Carlos\_Brandao](https://forum.ghost.org/u/Carlos_Brandao)\
**Post date:** [April 23, 2020, 4:49pm UTC](https://forum.ghost.org/t/problems-with-permission-i-need-help-i-am-2-days-trying-to-solve/13776/6 "2020-04-23T16:49:02Z")

</div>

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]  
✔ 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  
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.

---

<div class="post-metadata">

**Author:** ![Hannah](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/hannah/32/22_2.png) [@Hannah](https://forum.ghost.org/u/Hannah)\
**Post date:** [April 23, 2020, 5:18pm UTC](https://forum.ghost.org/t/problems-with-permission-i-need-help-i-am-2-days-trying-to-solve/13776/7 "2020-04-23T17:18:36Z")

</div>

If you followed our guide then in [this step](https://ghost.org/docs/install/ubuntu/?_ga=2.120441864.1646954198.1587367619-111327601.1584721487#create-a-new-user-) 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.

---

<div class="post-metadata">

**Author:** ![Carlos\_Brandao](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/carlos_brandao/32/7495_2.png) [@Carlos\_Brandao](https://forum.ghost.org/u/Carlos_Brandao)\
**Post date:** [April 23, 2020, 6:21pm UTC](https://forum.ghost.org/t/problems-with-permission-i-need-help-i-am-2-days-trying-to-solve/13776/8 "2020-04-23T18:21:52Z")

</div>

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]  
✔ 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  
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.

---

<div class="post-metadata">

**Author:** ![Hannah](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/hannah/32/22_2.png) [@Hannah](https://forum.ghost.org/u/Hannah)\
**Post date:** [April 23, 2020, 6:37pm UTC](https://forum.ghost.org/t/problems-with-permission-i-need-help-i-am-2-days-trying-to-solve/13776/9 "2020-04-23T18:37:10Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Carlos\_Brandao](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/carlos_brandao/32/7495_2.png) [@Carlos\_Brandao](https://forum.ghost.org/u/Carlos_Brandao)\
**Post date:** [April 23, 2020, 7:16pm UTC](https://forum.ghost.org/t/problems-with-permission-i-need-help-i-am-2-days-trying-to-solve/13776/10 "2020-04-23T19:16:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Carlos\_Brandao](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/carlos_brandao/32/7495_2.png) [@Carlos\_Brandao](https://forum.ghost.org/u/Carlos_Brandao)\
**Post date:** [April 23, 2020, 10:10pm UTC](https://forum.ghost.org/t/problems-with-permission-i-need-help-i-am-2-days-trying-to-solve/13776/11 "2020-04-23T22:10:07Z")

</div>

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

✖ 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?

---

<div class="post-metadata">

**Author:** ![Carlos\_Brandao](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/carlos_brandao/32/7495_2.png) [@Carlos\_Brandao](https://forum.ghost.org/u/Carlos_Brandao)\
**Post date:** [April 24, 2020, 12:35am UTC](https://forum.ghost.org/t/problems-with-permission-i-need-help-i-am-2-days-trying-to-solve/13776/12 "2020-04-24T00:35:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![aditodkar](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/aditodkar/32/16089_2.png) [@aditodkar](https://forum.ghost.org/u/aditodkar)\
**Post date:** [November 21, 2022, 8:17am UTC](https://forum.ghost.org/t/problems-with-permission-i-need-help-i-am-2-days-trying-to-solve/13776/13 "2022-11-21T08:17:56Z")

</div>

Use this command: `sudo chmod -R 777 /var/www/` this should solve your problem  
Reference: [How to correctly set writable the /var/www/ directory of an Ubuntu Linux system? - Super User](https://superuser.com/a/906671)
