SFTP account access to public_html

toplisek

Well-Known Member
Jan 7, 2010
183
11
68
Issue is how to connect in this case just to public_html as there is any password / username or path to particular folder. I like just access to public not the whole account.


Need help.
 

Jcats

Well-Known Member
PartnerNOC
May 25, 2011
806
156
168
New Jersey
cPanel Access Level
DataCenter Provider
Hello,

This isn't possible out of the box with cPanel as the only user that can SFTP is the cPanel user itself which will have full access to the entire account including the home directory.

If you require SFTP, then you would need to add a new linux user but then you would run into issues with file ownership.
 

toplisek

Well-Known Member
Jan 7, 2010
183
11
68
How to solve than securely access to public_html?
Can be disabled configuration settings for FTP access but only particular accounts can have FTP accounts?
 

Jcats

Well-Known Member
PartnerNOC
May 25, 2011
806
156
168
New Jersey
cPanel Access Level
DataCenter Provider
Securely access them in what way, are you referring to encryption or limiting the users access?

If you want to force encryption, you can do so for FTP as well using FTPS

In WHM go to

  • Home »
  • Service Configuration »
  • FTP Server Configuration
and set "TLS Encryption Support" to Required.

If you are referring to limiting an FTP user access to a specific directory, like public_html, then you can create them an FTP in cPanel as well as specify the home directory so if you do public_html they will not be able to browse the home directory of the account.
 
Last edited by a moderator:
  • Like
Reactions: cPanelMichael