Ghost Blog EACCES: permission denied Fix
Have you run into an error similar to ' EACCESS: permission denied ' when attempting to upload images or perform various tasks inside of your Ghost Blogging platform?
The EACCES: permission denied error can occur for a variety of reasons, however, this usually occurs when the user running the ghost installation does not have access to the directory the ghost installation is running in.
Fix for EACCES: Permission Denied
The easiest way to resolve this error is to perform the following tasks:
- Run the 'ghost doctor' command within your ghost installation directory. In my case, this was /var/www/ghost.
- If ghost doctor identifies any issues, it will notify you of what commands you may need to run to resolve them. For example, incorrect folder/file permissions inside of the ghost installation can be fixed with the command you are provided by the ghost doctor output.
- If no issues are identified, the issue may actually have to do with the folder/file ownership.
- In my case, I had to issue a chown -R ghost:ghost ghost command. The 'chown' command stands for change owner, the '-R' is to make the command run recursively, the 'ghost:ghost' defines what user is going to be getting access to a folder and the final 'ghost' stands for the ghost installation directory.
- Once I have run the above command, the EACCES: Permission Denied error was no longer occurring and I was now able to upload images without any issues.
Should you continue to have issues, please double check that 'ghost' is in fact the user your Ghost installation is running under. Some providers with automatic installers for Ghost utilize different users, such as, but not limited to ghost-mgr etc.