# Stack: Error: EACCES: permission denied ghost config url

**URL:** https://forum.ghost.org/t/stack-error-eacces-permission-denied-ghost-config-url/9208
**Category:** Developer help
**Created:** [September 24, 2019, 11:17pm UTC](https://forum.ghost.org/t/stack-error-eacces-permission-denied-ghost-config-url/9208 "2019-09-24T23:17:30Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![blegit](https://avatars.discourse-cdn.com/v4/letter/b/71c47a/32.png) [@blegit](https://forum.ghost.org/u/blegit)
#### Post date: [September 24, 2019, 11:17pm UTC](https://forum.ghost.org/t/stack-error-eacces-permission-denied-ghost-config-url/9208/1 "2019-09-24T23:17:30Z")

</div>

Hello I just set up ghost with digital ocean but at the time I did not have a domain name. No I am trying to setup SSL with lets encrypt and I am trying to edit the config file to setup my domain and I get this error:

**Debug Information:**  
OS: Ubuntu, v18.04  
Node Version: v8.10.0  
Ghost-CLI Version: 1.11.0  
Ghost version: 2.31.1 (at /var/www/ghost)  
Environment: production  
Command: ‘ghost config url [http://bryanhope.com/](http://bryanhope.com/)’  
An error occurred.

Message: ‘EACCES: permission denied, open ‘/var/www/ghost/config.production.json’’

**Here is the content of the log file**

Stack: Error: EACCES: permission denied, open ‘/var/www/ghost/config.production.json’  
at Object.fs.openSync (fs.js:646:18)  
at Object.fs.writeFileSync (fs.js:1299:33)  
at Object.writeFileSync (/usr/local/lib/node\_modules/ghost-cli/node\_modules/jsonfile/index.js:117:13)  
at Config.save (/usr/local/lib/node\_modules/ghost-cli/lib/utils/config.js:91:12)  
at ConfigCommand.run (/usr/local/lib/node\_modules/ghost-cli/lib/commands/config.js:38:50)  
at Function.\_run (/usr/local/lib/node\_modules/ghost-cli/lib/command.js:178:35)  
at Object.handler (/usr/local/lib/node\_modules/ghost-cli/lib/command.js:60:22)  
at Object.runCommand (/usr/local/lib/node\_modules/ghost-cli/node\_modules/yargs/lib/command.js:242:26)  
at Object.parseArgs [as \_parseArgs] (/usr/local/lib/node\_modules/ghost-cli/node\_modules/yargs/yargs.js:1078:30)  
at Object.parse (/usr/local/lib/node\_modules/ghost-cli/node\_modules/yargs/yargs.js:566:25)  
at Object.run (/usr/local/lib/node\_modules/ghost-cli/lib/bootstrap.js:182:14)  
at Object. (/usr/local/lib/node\_modules/ghost-cli/bin/ghost:16:11)  
at Module.\_compile (module.js:652:30)  
at Object.Module.\_extensions…js (module.js:663:10)  
at Module.load (module.js:565:32)  
at tryModuleLoad (module.js:505:12)  
Code: EACCES  
Path: /var/www/ghost/config.production.json

---

<div class="post-metadata">

### Author: ![vikaspotluri123](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/vikaspotluri123/32/24_2.png) [@vikaspotluri123](https://forum.ghost.org/u/vikaspotluri123)
#### Post date: [September 24, 2019, 11:41pm UTC](https://forum.ghost.org/t/stack-error-eacces-permission-denied-ghost-config-url/9208/2 "2019-09-24T23:41:32Z")

</div>

What user are you running as? It should be the same user that installed Ghost

---

<div class="post-metadata">

### Author: ![blegit](https://avatars.discourse-cdn.com/v4/letter/b/71c47a/32.png) [@blegit](https://forum.ghost.org/u/blegit)
#### Post date: [September 24, 2019, 11:45pm UTC](https://forum.ghost.org/t/stack-error-eacces-permission-denied-ghost-config-url/9208/3 "2019-09-24T23:45:57Z")

</div>

well I created a super user from the command line which is probably different from whatever I did when I set up the DO droplet how would I find out which user was created when the droplet was created?

---

<div class="post-metadata">

### Author: ![vikaspotluri123](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/vikaspotluri123/32/24_2.png) [@vikaspotluri123](https://forum.ghost.org/u/vikaspotluri123)
#### Post date: [September 24, 2019, 11:49pm UTC](https://forum.ghost.org/t/stack-error-eacces-permission-denied-ghost-config-url/9208/4 "2019-09-24T23:49:07Z")

</div>

You can probably guess by looking at the file owner:

`stat /var/www/ghost/config.production.json -c "%U"`

I’m guessing you did it with `ghost-mgr`

---

<div class="post-metadata">

### Author: ![blegit](https://avatars.discourse-cdn.com/v4/letter/b/71c47a/32.png) [@blegit](https://forum.ghost.org/u/blegit)
#### Post date: [September 25, 2019, 12:01am UTC](https://forum.ghost.org/t/stack-error-eacces-permission-denied-ghost-config-url/9208/5 "2019-09-25T00:01:15Z")

</div>

That worked thanks but now when I run ghost setup ssl I get the error:  
Nginx config file does not exist, skipping SSL setup  
Setting up SSL skipped

do I need to generate this config file?

---

<div class="post-metadata">

### Author: ![vikaspotluri123](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/vikaspotluri123/32/24_2.png) [@vikaspotluri123](https://forum.ghost.org/u/vikaspotluri123)
#### Post date: [September 25, 2019, 12:01am UTC](https://forum.ghost.org/t/stack-error-eacces-permission-denied-ghost-config-url/9208/6 "2019-09-25T00:01:42Z")

</div>

Try running `ghost setup nginx ssl`  
(this will setup nginx + add ssl)

---

<div class="post-metadata">

### Author: ![blegit](https://avatars.discourse-cdn.com/v4/letter/b/71c47a/32.png) [@blegit](https://forum.ghost.org/u/blegit)
#### Post date: [September 25, 2019, 12:04am UTC](https://forum.ghost.org/t/stack-error-eacces-permission-denied-ghost-config-url/9208/7 "2019-09-25T00:04:57Z")

</div>

> [@vikaspotluri123](#):
>
> nginx ssl

That worked, when I originally ran ghost config url I ran this:  
ghost config url [http://bryanhope.com/](http://bryanhope.com/)  
do I need to rerun as http **s** ://bryanhope.com

also do I need to restart server for changes to take effect?

---

<div class="post-metadata">

### Author: ![vikaspotluri123](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/vikaspotluri123/32/24_2.png) [@vikaspotluri123](https://forum.ghost.org/u/vikaspotluri123)
#### Post date: [September 25, 2019, 12:09am UTC](https://forum.ghost.org/t/stack-error-eacces-permission-denied-ghost-config-url/9208/8 "2019-09-25T00:09:04Z")

</div>

Yep, to change the url just run `ghost config set url {url}` and `ghost restart`:

[https://ghost.org/faq/change-configured-site-url/#change-the-configuration](https://ghost.org/faq/change-configured-site-url/#change-the-configuration)

---

<div class="post-metadata">

### Author: ![blegit](https://avatars.discourse-cdn.com/v4/letter/b/71c47a/32.png) [@blegit](https://forum.ghost.org/u/blegit)
#### Post date: [September 25, 2019, 12:12am UTC](https://forum.ghost.org/t/stack-error-eacces-permission-denied-ghost-config-url/9208/9 "2019-09-25T00:12:42Z")

</div>

> [@blegit](#):
>
> ttp **s** ://bryanhope.com

excellent thank you!
