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 sets
ghost as a
You can make changes as
root -- it won't change permissions on an existing file. If you create a new file from the CLI as
root, 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 see
ghost, that's the user and group, so any new files you create from the CLI would need to modified using
chown (change ownership).
For example, if we create a new file
root and we want that file to be owned by
ghost, we'd run:
chown ghost:ghost demo.txt
The above works on directories as well. If we had a directory
/var/www/html/mynewdir and we wanted it to be owned by
chown ghost:ghost /var/www/html/mynewdir
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.
chown -R ghost:ghost /var/www/html/mynewdir
The above changes ownership on
mynewdir and all files and directories under it.
chown -R ghost:ghost /var/www/html/mynewdir/*
The above changes ownership of all files and directories under
mynewdir but not