'EACCES: permission denied, open '/var/www/ghost/.ghost-cli''


#1

I’m trying to update my ghost to the latest version from 1.22.

I’m not sure what to do after opening ‘/var/www/ghost/.ghost-cli’’ :man_shrugging:

Here’s more info on what I did:

Running ghost update:

✔ 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
An error occurred.
Message: 'EACCES: permission denied, open '/var/www/ghost/.ghost-cli''

Debug Information:
    OS: Ubuntu, v16.04
    Node Version: v6.11.5
    Ghost-CLI Version: 1.9.8
    Environment: production
    Command: 'ghost update'

Additional log info available in: /home/vikash/.ghost/logs/ghost-cli-debug-2018-12-01T10_45_40_015Z.log

When I checked the log, this is what I found:

  GNU nano 2.5.3 File: ...host-cli-debug-2018-12-01T10_45_40_015Z.log           

    at Error (native)
    at Object.fs.openSync (fs.js:642:18)
    at Object.fs.writeFileSync (fs.js:1348:33)
    at Object.writeFileSync (/usr/lib/node_modules/ghost-cli/node_modules/jsonf$
    at Config.save (/usr/lib/node_modules/ghost-cli/lib/utils/config.js:91:12)
    at Instance.set cliVersion [as cliVersion] (/usr/lib/node_modules/ghost-cli$
    at ui.run.then.then (/usr/lib/node_modules/ghost-cli/lib/commands/migrate.j$
    at tryCatcher (/usr/lib/node_modules/ghost-cli/node_modules/bluebird/js/rel$
    at Promise._settlePromiseFromHandler (/usr/lib/node_modules/ghost-cli/node_$
    at Promise._settlePromise (/usr/lib/node_modules/ghost-cli/node_modules/blu$
    at Promise._settlePromise0 (/usr/lib/node_modules/ghost-cli/node_modules/bl$
    at Promise._settlePromises (/usr/lib/node_modules/ghost-cli/node_modules/bl$
    at Async._drainQueue (/usr/lib/node_modules/ghost-cli/node_modules/bluebird$
    at Async._drainQueues (/usr/lib/node_modules/ghost-cli/node_modules/bluebir$
    at Immediate.Async.drainQueues (/usr/lib/node_modules/ghost-cli/node_module$
    at runCallback (timers.js:672:20)
Code: EACCES
Path: /var/www/ghost/.ghost-cli

Since ghost doctor is supposed to tell what exactly the issue is, I tried it and everything seems to be fine. This is what I got for 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_ip.address
Instance is currently running
ℹ Validating config [skipped]
✔ Checking folder permissions
✔ Checking file permissions
✔ Checking content folder ownership
✔ Checking memory availability

I’m not really sure how to get over this EACCES issue. Any help is gladly appreciated. :slight_smile:

My CLI version is 1.9.8. And I think that’s the latest version? :thinking:


#3

Since this was a permission related issue, I thought I’d create a new user using this link.

Running ghost doctor says I’m not the directory owner nor have permissions for the current folder. The terminal pointed me to two links (this and this) for both of these issues and both of them didn’t have content related to the issue.

I’m guessing if I make this new user the directory owner and give permissions, I’d be able to fix this issue?


#4

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