Allowing password protected access to public_ftp directory

Orerockon

Registered
Dec 29, 2019
2
0
1
USA
cPanel Access Level
Website Owner
I've done this in the past with another hosting provider but I can't seem to find it in the menu. What I want to do is place a zip file in the public_ftp folder and allow any user to login under one account that is password protected. So for example they call up ftp://example.com, login with a generic username and enter the password so they can download the file. I don't want to use anonymous login. How do I set this up? And only give access to that folder?
 
Last edited by a moderator:

cPSamuelM

Technical Analyst Team Lead
Staff member
Nov 20, 2019
189
31
103
USA
cPanel Access Level
Root Administrator
Hello @Orerockon,

You can absolutely create an FTP account with a unique username and password, and restrict its access to a specific folder. Please refer to the documentation on the following page with instructions for creating FTP accounts in cPanel and configuring the FTP client to connect:


Feel free to let us know if you have any questions.
 

Orerockon

Registered
Dec 29, 2019
2
0
1
USA
cPanel Access Level
Website Owner
Excellent! I was going to do that but I was afraid to create an account after I read the "your website will break if you screw this up". Also I was unsure if it would restrict access to the initial folder but that appears to work. Is there a chance that access to the root is exploitable once the user logs in?
 

cPSamuelM

Technical Analyst Team Lead
Staff member
Nov 20, 2019
189
31
103
USA
cPanel Access Level
Root Administrator
Hello @Orerockon,

FTP user accounts cannot escalate their privileges or switch users, so there would be no worry over exploiting any root-level content on the server. Additionally, the user can only access the home directory that is specified when the account is created and its subdirectories. I hope this clarifies the matter for you. Feel free to let us know if you have any further questions!
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,304
1,250
313
Houston
Also to address:

I was going to do that but I was afraid to create an account after I read the "your website will break if you screw this up".
If you add or remove files in your website's directories incorrectly, yes it could break things. The creation of the FTP account though wouldn't do that.