• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question Restrict SFTP to httpdocs Plesk Onyx

ChrisScottUK

New Pleskian
Hi there,

New to plesk so please be patient. I've already searched the documentation, forums and google, but am struggling to find the specific answer.

I would like to enable SFTP access on Plesk Onyx which is restricted (Chrooted) to the httpdocs folder.

I have found various tutorials via google to achieve this but all involve me changing the owner and group from the plesk defaults to root. I'm not keen to do this incase it breaks plesk.

Is there another way I can achieve this so a SFTP user can not accesss the other parts of the server higher than httpdocs?

Thank you
 
Last edited:
Don't change any of the permissions as you are going to definitely break things. Why do your users need SSH access to the server ? You should really be using FTP/S not SFTP. FTP/S will allow your users to transfer files and have everything secure. If you really need to give out shell access to the user then make sure that under "web hosting access" for the domain that you select "/bin/bash (chrooted)" for Access to the server over SSH to restrict the shell for that user.
 
thank you Danami for taking the time to respond

Dont' worry I have no intention of changing the permissions,:)
That's a great question re FTPS vs SFTP, SFTP is easier for endusers to work through firewall which can cause a lot of problems, and hence is in more and more demand.

Thank for the tip re /bin/bash (chrooted), however I need to get it so they are chrooted to the httpdocs folder? is there anyway of achieveing this?
 
thank you Danami for taking the time to respond
That's a great question re FTPS vs SFTP, SFTP is easier for endusers to work through firewall which can cause a lot of problems, and hence is in more and more demand.

Your users shouldn't have any problems with FTPS if your firewall and proftpd is configured correctly. See the link below (You don't need to use our firewall either as you can do the same thing using the firewall package right from Plesk).
https://docs.danami.com/juggernaut/basics/centos-rhel-config-tasks#proftpd-configuration
 
Thank you Danami,
Actually some users experience problems with their firewall, not the server firewall. This guide from filezilla explains some of the difficulties people can experience https://wiki.filezilla-project.org/...icious_routers.2C_firewalls_and_data_sabotage

Anyhow I'm interested in help to chroot sftp to the plesk httpdocs directory, I'm not looking for a work around, though thanks for pointing me to your website it looks very interesting :)
 
Back
Top