Using ProFTP and Wordpress Together in /var/www/
I’ve set up a Wordpress installation. I’d like to be able to SFTP into the
wp-content directory in Wordpress to create a custom theme by saving files directly to the server in the theme directory.
I followed this SFTP using ProFTPd tutorial and modified a few other things in
- I set
- As I had issues creating files (despite being able to connect and see the structure of
/var/www/, I also created a directory configuration directive:
<Directory /var/www/> <Limit STOR CWD MKD RMD DELE XRMD XMKD> AllowAll </Limit> </Directory>
I still had issues creating files or this point and assumed it was a result of some unix permissions issues. I went to the
var/www/ directory and entered the following two commands:
sudo chown -R username:username *
sudo chmod -R 0755 *
At this point, the
.htaccess file is still owned by
www-data but everything else is owned by my unix username (not
root). At this point, I could finally SFTP into my server and post files. Terrific!
…Except… When I use Wordpress at this point, I have trouble installing themes or plugins due, I assume, to (yet again) a unix a permissions issue. The error message I get is Unpacking the package… Could not create directory..
I’m no unix expert but it seems like in order to SFTP files into
/var/www/ I need to own the files, but that prevents Wordpress from installing items through its web interface.
Can anyone help me configure things in such a way that things will work whether I manually SFTP or try to install a theme or plugin from Wordpress?
Thank you so much for reading. I hope this explanation was helpful.
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.