How do I upload a Ghost Theme file using filezilla sftp?

September 13, 2014 2k views

Using filezilla sftp to download a file from my server works just fine. However, I can not upload a theme file using filezilla. I am logged in as a user with root permissions. Do I need to make some permission changes to be able to upload files?

  • What's the actual error message that you're seeing? Are you using the preinstalled Ghost one-click app? /var/www/ghost/ should be owned by the ghost user. I've just tested uploading files to /var/www/ghost/content/themes/ using Filezilla on with the default Ghost droplet and was able to do so without any issues.

  • I did set up with the preinstalled Ghost one-click app. After install I added a user and disallowed logging on as root. I think this is what blocked my access to the theme folder.
    I worked around this by uploading to a temp folder in the /var/www/ directory and then used the terminal/cmd line to move the file to the theme folder.

2 Answers

I was having this same problem. I didn't find anything on DigitalOcean community about this, so I went out to the farther deeper parts of the internet to find an answer.

Eventually I pieced together the answer by reading several different forum posts and and stitching everything together and filling in the holes.

Alas, this is what I did to solve the problem.

As it turns out, VSFTPD does not make any changes to file permissions. Long story short, the /var/www/ folder does not (for several obvious reasons) have executable properties to it, and apparently the act of creating a new folder (such as ones needed for your theme) requires those permissions. So you need to change the permissions.

What I did is this:

chmod 777 -R /var/www/ghost/content/themes

This gives the themes folder (and deeper folders) executable rights for all users on the system. If you try to upload your files now they should work.

Now after I uploaded the files, I decided that I did not want to keep the folder with executable permissions, so as soon as it was successfully uploaded I reversed the process, thereby making it secure again.

chmod 755 -R /var/www/ghost/content/themes

The above line of code will do the trick, locking down your folders in the way they were before.

Hope that helps!

Have another answer? Share your knowledge.