question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Content folder permissions

See original GitHub issue

Summary

The files in the content folder of your blog installation have the following permissions:

  • in production
  • 644 for files
  • owned by the Ghost user

The problem with these restrictions is that if i am logged in with my custom ubuntu user (which is the default case), i am not allowed to edit these files, because they are owned by the ghost user with 644 permissions. I have to change the permissions to e.g. 646 or i have to use sudo to edit the files.

This feels like we got the permissions wrong. The content folder is for user data. The challenge is to support both:

  • that the ghost user needs to be able to write files in the content folder
  • that the ubuntu user is able to edit the files

Possible solution

Use a ghost group and change the permissions to 664.

This needs further research.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
kirrg001commented, Aug 22, 2018

The main Q is, why Ghost has to run under ghost user?

It’s because of privilege restriction and separation. The ghost user is a non-sudo user.

1reaction
acburdinecommented, Jul 13, 2018

Yeah, a similar approach might actually be the best approach for the CLI. Maybe some sort of command ghost content edit <file> or something that would edit the file in your favorite editor, then save the file back as the ghost user, thus preventing any issues with file permissions.

It’s a bit of a workaround to the actual problem, but it seems like a decently clean solution

Read more comments on GitHub >

github_iconTop Results From Across the Web

Establishing Windows File and Folder Level Permissions
Standard Permission Types ; List Folder Contents, Permits the user(s) to: view the file names and subfolder names. navigate to subfolders. view ...
Read more >
NTFS Permissions : An Overview
NTFS permissions are logically grouped into a series of six basic permissions, each of which is comprised of a specific set of advanced...
Read more >
Changing File Permissions – WordPress.org Forums
On computer file systems, different files and directories have permissions that specify who and what can read, write, modify and access them.
Read more >
Folder permissions - IBM
Determines the types of folder functions that users can perform. For example, Access lets users open the folder with Content Manager OnDemand client...
Read more >
WordPress File Permissions: A Beginner's Guide - BlogVault
WordPress folder permissions exist to serve as security measures for systems that have multiple users, like servers.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found