I’ve been spinning up the Ghost one-click on Ubuntu 16.04 and really digging it. By default, DO creates a ghost user that owns the folder and the systemd service. I need to make some edits to the templates and CSS. What’s the most secure way to set this up? Should I:
Thanks!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
@samjulien
The
ghost
user most likely isn’t setup with a password, which is probably intentional as the one-click doesn’t setup SFTP for use with multiple user accounts, nor setsghost
as asudo
user.You can make changes as
root
– it won’t change permissions on an existing file. If you create a new file from the CLI asroot
, however, you’d need to make sure it’s owned by the same user and group as the other files.So if you run
ls -al
and seeghost
andghost
, that’s the user and group, so any new files you create from the CLI would need to modified usingchown
(change ownership).For example, if we create a new file
demo.txt
asroot
and we want that file to be owned byghost
, we’d run:The above works on directories as well. If we had a directory
/var/www/html/mynewdir
and we wanted it to be owned byghost
:We can also do recursion, which means all files and directories in a given path will be changed to the user and group specified. You need to be careful with this one. Make sure the path you specify is correct as there is no undo button.
The above changes ownership on
mynewdir
and all files and directories under it.The above changes ownership of all files and directories under
mynewdir
but notmynewdir
.