How to add SFTP to the specific access folder?

toplisek

Well-Known Member
Jan 7, 2010
286
23
68
How to add SFTP to the specific access folder inside public_html using updated WHM version?
 
Last edited:

cPJustinD

Administrator
Staff member
Jan 12, 2021
286
52
103
Houston
cPanel Access Level
Root Administrator
Hey there! Only the root user, SSH users, and cPanel users can connect to the server via SFTP. You cannot use an FTP account to connect via SFTP.

Are you trying to create a new SFTP user, or are you wishing to change an existing user's access so that it is restricted to just the directories below public_html?

You can also find more information on connecting via SFTP here:

How to use SFTP with cPanel
 

cPJustinD

Administrator
Staff member
Jan 12, 2021
286
52
103
Houston
cPanel Access Level
Root Administrator
Unfortunately, there isn't any current functionality within cPanel or its bundled software that would restrict SFTP users to specific directories. This is due to directory structures of the users stored in /etc/passwd. As such, I cannot guarantee the implementation of this functionality.

With that being said, you can submit a feature request for this if you would like. Our feature request site is actively reviewed and curated by our development team to identify potential future build plans and accept our community's ideas and suggestions. Adding a feature request here will allow the rest of cPanel's users to vote for it if they would like to see it implemented.

While we cannot guarantee that all requests will be accepted, this is the best way to make suggestions visible to the teams that build cPanel. If you would like to submit a feature request, you may use the "Submit a Feature Request" link in my signature below.

Please let me know if you have any further questions or concerns, and I hope you have a great rest of your day!
 

cPAdminsMichael

Well-Known Member
Dec 19, 2016
186
67
153
Denmark
cPanel Access Level
Root Administrator
Alternatively, you may use FTPS as it will use the FTP accounts created in cPanel where you can also specify home directories ;)
 
  • Like
Reactions: cPJustinD

toplisek

Well-Known Member
Jan 7, 2010
286
23
68
I have cheked:
While FTPS adds a layer to the FTP protocol, SFTP is an entirely different protocol based on the network protocol SSH (Secure Shell). Unlike both FTP and FTPS, SFTP uses only one connection and encrypts both authentication information and data files being transferred.

So, we click FTP accounts. How to decide for FTPS?
 

cPAdminsMichael

Well-Known Member
Dec 19, 2016
186
67
153
Denmark
cPanel Access Level
Root Administrator
That's true, FTPS is still using the FTP ports, (20+21 + PASV ports), but it's the best alternative today :)
 
  • Like
Reactions: cPJustinD

cPJustinD

Administrator
Staff member
Jan 12, 2021
286
52
103
Houston
cPanel Access Level
Root Administrator
So, we click FTP accounts. How to decide for FTPS?
Here you would configure the FTP account as normal. When connecting via an FTP client, however, there should be an option to change the protocol from regular FTP to FTPS or FTP-SSL.

Additionally, you will need to ensure the FTP hostname used to connect has a valid certificate installed.
 

toplisek

Well-Known Member
Jan 7, 2010
286
23
68
Thank you for the message. We will use S3 as an alternative. It is more secured and it defines security layers.