nick soph's picture

Im trying to connect up to the latest Turnkey Wordpress appliance from MS WebMatrix. WebMatrix only has vanilla FTP support and I have looked but been unable to find instructions for installing FTP on Turnkey Appliances - Can someone point me in the right direction?




nick soph's picture

I followed the instructions below and then added a new user using webmin, with root and ftpuser group membership and used that login to connect to the server.  

Sure that I should have made the user a member of a different group and/or added permissions but not concerned about security in this instance but if anyone can tell us what the right way to grant acccess would be that might help others looking to do similar.

Windows 10 64bit with HyperV - learning Javascript slowly

Jeremy Davis's picture

As you discovered TKL is based on Debian (v13.x based on Debian Wheezy/7) so generally any Debian info also applies to TKL (at least the server stuff anyway...).

However, personally I find the Ubuntu docs more detailed and thus more helpful. Strictly speaking Debian and Ubuntu aren't quite the same, but for most purposes they are close enough... As such, I suggest you have a read here. Beyond that you might find some other helpful info via google (here is another random post that came up in google when I was searching for the link to the Ubuntu docs for you).

nick soph's picture

Having used the Turnkey Wordpress ISO to create lots of wordpress installs over the past couple of months I have never been able to get Wordpress to install it's updates without installing the plain ftp server as described above.

If you follow the following process

Create VM
Install WP appliance from ISO file
Install Updates 
Give ownership of /var/www to www-data ( chown -R www-data:www-data /var/www)
Set write permissions on /wp-conten ( chmod -R 775 /var/www/wordpress/wp-content)
Reboot (not likely to be necessary)
Login to Wordpress admin at server/wp-admin

When you try and update Wordpress - it prompts you for your servers ftp login details, giving only ftp and ftp ssl as options for doing so.

There seems to be something wrong here although I cant be sure simply because I know so very little about Linux/Wordpress.

If there is anybody who is able to comment on what is going on here?

nick soph





Jeremy Davis's picture

As per the issue I just put up on the TKL Issue Tracker I suggest that you try adding:

define('FS_METHOD', 'direct');
nick soph's picture

The following ftp install seems to work for me, in that it works well with Wordpress.

It seems the reasons vanilla ftp is not included by default relate to security and these instructions will make your machine less secure. 

There are 4 parts;

  1. Install and configure FTP server
  2. Create a new user with membership of the www-data group
  3. Set permissions on the www-data folder
  4. Enter Server and new user details into Wordpress 

1. Install and configure FTP server
Web Shell to server (https://server:1230) as root.
Install using;
     apt-get install vsftpd

Edit the ftp configuration file which is;

In vsftpd.conf remove the hash to enable local users to login;

# Uncomment this to allow local users to log in.

and for ftp to have write permissions

# Uncomment this to enable any form of FTP write command.

Once the vsftpd.conf file is saved the service must be restarted and the instructions found suggest

restart vsftpd

but bash reports it cant find 'restart' and I rebooted for the changes to take effect.


2. Create a new user with membership of the www-data group
Login to Webmin (https://server:12321) as root.
Select System then Users and Groups and Create a new user, set the home directory to
/var/www and a Normal password. Make a note of the new username and password.

Make the users primary group www-data. 

Create home directory is set to No, and
Copy template files.. is set to No

Create the new user.


3. Set permissions on the www-data folder
Web Shell to server (https://server:1230) as root.
Give ownership of www folder to www-data

    chown -R www-data:www-data /var/www


4. Enter server and user details into WordPress
Login to WordPress Admin (http://server/wp-admin) as admin.
Select Update Wordpress and when the form appears give
IP address of the server, The username and password created earlier.
Wordpress should update. 


Jeremy Davis's picture

But personally I think that adjusting the permissions and WP config to allow internal updating/installing is a better option (as per my post above and/or the bug I just lodged on the TKL Issue Tracker)

nick soph's picture

Hi Jeremy,

I'm sure your method is better but I just seemed to be getting random (ie I have no idea why) issues without the standard ftp installed.  Probably Im doing something wrong but without the ftp it just seems to go wrong but with it, seems to work. I wonder if it might be to do with permissions being altered by me using filezilla or some other process outside of wordpress.

Thanks for your help,



Jeremy Davis's picture

Now worries mate. whatever works for you! That's the beauty of open source - there's always multiple ways to achieve your ends! :)

As for you having issues at times, perhaps you are right. If you are using the root account to upload files via SFTP then that may well be your issue. What you could try is resetting the permissions (as per my post) and use your new user to login via SFTP when you want to manually upload stuff to the WordPress folder (and reserve root SFTP login for write access to the rest of the filesystem). I reckon that would stop your issues from recurring...

Also out of interest there appears to be a WordPress setting (that you can add to the wp-config.php file) that allows it to update via SFTP (instead of FTP/FTPS) although I haven't tested it...

Also was a bit rude of me to not thank you for your contribution! It's a great piece of documentation! And regardless of what I think, I'm sure others will appreciate it! :)

Also the beauty of your setup, is that with a little more config (on vsftpd - create a user chroot jail) you could then relatively safely hand over maintenance of the WP site to someone else, while retaining the root/admin access for yourself...

nick soph's picture

Hi Jeremey

thanks for the time you're taking with this.

From what you say it seems that the new user account (rather than the ftp install) is making the difference and if I simply applied the permissions and used a (new?) account (ie not root) to access the files when ftping it might solve at least some and probably all of the problems. I will have a look at the Wordpress docs to discover what permissions it demands, test and report back. It would be nice to have a clear and appropriate set of instructions.

Thanks again,

nick soph

nick soph's picture

Just had a look at the Wordpress docs relating to permssions and can see they relate but can't really understand all that is being said. The link below discusses those permssions 

I couldnt find a setting that allowed SFTP but there is a plugin to allow it,



nick soph's picture


Used the following method and it seems to work. 

Installed Turnkey Wordpress and updated OS

Used Filezilla to login as root and copy over directory ssh-sftp-updater-support to /var/www/wordpress/wp-content/plugins

Loged into webmin as root
created new user with membership of www-data and note username/password, home /var/www

login to :12320 as root
chown -R www-data:www-data /var/www/wordpress (if this is changed to just the /wp-content directory the plugins update but wordpress updates fail)
chmod -R 775 /var/www/wordpress/wp-content

login to wordpress as admin and enable ssh-sftp plugin 

update plugins - using new user details and ssh-sftp
Update wordpress

and use the same new user to connect when using filezilla.




Jeremy Davis's picture

When I tested it, I only changed the permissions on /var/www/wordpress/wp-content and added the line to the wp-config.php and it worked ok for me.

But the way you have set it up seems like it might be much better in the long run, especially if you want someone else to maintain the site (but not the whole server) and/or if you use Filezilla (or similar) to manually work on stuff.

nicksoph's picture

Thanks Jeremey

I have suspcions about my understanding of the permissions. Im likely to have granted more than is needed and that that I had logged in using sftp as root and written into the directories confused permissions. 

The machine edits have a particular purpose for me in that Im trying to learn about Wordpress. I have enjoyed tweaking the standard TK Wordpress server and have found a way of working that suits me and might suit others who wanting a TK VM. 

I use a VM in Win8's inbuilt Hyper V, adding a new user and the ftp and a SMB server. (Im sure you are right when you say the ftp server is superfluous but I can't seem to get it right without it.) The ability to use a shared folder directly to the Web directories adds a useful feature on a Windows hosted VM development environment. Security is not really any concern for me but it might be of benefit to have sensible security settings for others.

Add new comment