By 2digit
My theme support needs FTP access with username and password. I guess it can be SFTP since I read FTP is not good due to secutiry. I am trying to figure out how to give them access to my wordpress folder. I am trying for more than 4 hours now and in that time I manage to get my site down but nothing worked.
I know I am asking a lot but I would really like a step by step tutorial.
Thanks
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Setting up SFTP isn’t all that difficult, though when it comes to SFTP, the base folder must be owned by root, thus setting up SFTP on a specific directory wouldn’t be possible as the point is to prevent users from being able to escape (in theory).
So if your home directory (for example) is:
/home/myuser/public_html
… and your themes directory is:
/home/myuser/public_html/wp-includes/themes
Then you won’t be able to setup SFTP on ./themes as ./wp-includes isn’t owned by root and you really don’t want it to be.
The way SFTP works, with the default modifications we’d normally make to SSH’s configuration is that the users defined home directory is owned by root and directories below it are owned by the user.
For example, if we create a home directory for a new user:
mkdir -p /home/newuser
… create a few directories below it:
mkdir -p /home/newuser/{public,private,logs}
Resulting in:
/home/newuser/public
/home/newuser/private
/home/newuser/logs
Then we add a new user and specify the home directory:
useradd -d /home/newuser newuser
The directory /home/newuser needs to be owned by root, else you won’t be able to login. The other directories we created can be owned by newuser and they should, but if that one directory isn’t owned by the root user, login will fail.
The only way around this would be to create an SFTP user on another directory and then sync the two using rsync or lsyncd, but that adds a little more complexity to something that should be simple.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.