Setting up SFTP to one folder only


#1

I have a web site running I also have folder that a seprate page that I need SFTP to on an all day basis. A small txt file gets updated. It has to rename and replace the file.
Can I set up a SFTP only user?

Ive had this setup working here for a few years with no problems at all. Now DH is having a glitch with FTP, support says set this up as SFTP thats not affected by this glitch.

The more I read on the wiki the more I’m confusued on the best way to add this?

/home/username/mywebsite.com this is my main site.

/home/username/mywebsite.com/WDL this is the location of txt files that I need to update by SFTP.


#2

I don’t understand why you need to SFTP to only one folder. Just set WDL as your initial directory in your client if you don’t want to deal with your home directory. If you want only one because you want to share that with others, then you may want to check the wiki for subdir mapping.

Also, if you are just updating a single text file, you could set up a cron job to fetch the file from somewhere more convenient.