Last updated: September 13th 2019
Using SFTP on Webdock Stacks
SFTP is actually built in to the SSH daemon which is installed on Ubuntu, so using SFTP is simply a matter of adding a shell user with the correct group assignment and then connecting. You may need to watch out for permission issues however. Here are the steps on how to use SFTP on a typical Webdock stack in order to work in the web root:
1. Create a Shell user in Webdock where you set the user group to "www-data"
2. Either enable Password based authentication, or configure your FTP client to use your Key File
Now you can connect to the server and the server will drop you into your home directory under /home/yourusername - you now need to navigate to /var/www/html (typically, unless you changed the web root) in order to work with your files.
At this point you will be able to read files, but probably not write any files and you will experience permission issues
In order to solve the write permission issue, you need to issue the following command on your server:
chmod -R g+rw /var/www/html
This command basically says "Recursively give Read and Write access to anyone in the group which owns the file or directory, starting in /var/www/html"
This all assumes you have not modified your web root in any way, or changed ownership of your web root. If you have, modify the commands and group above accordingly.