How can I give a user ftp access to backup folder

Biotron2000

Active Member
Jul 20, 2004
41
0
156
I want to be able to connect to my server via FTP to copy backup files to another server. How can I give a non-root user permission to access my backup folder (/backup, in this case)?

Thank you,
Patrick
 

rhenderson

Well-Known Member
Apr 21, 2005
784
2
168
Oklahoma
cPanel Access Level
Root Administrator
When you create a FTP user acount in cPanel, use the name backup. It will create the directory for you called backup. Not a great name to use BTW. Since it's in public_html you might want to add an index.html to the directory too.
I think they mean /backup not /home/username/public_html/backup but /backup probably a mounted point on an extra drive or just a folder off root named /backup.

I want to be able to connect to my server via FTP to copy backup files to another server. How can I give a non-root user permission to access my backup folder (/backup, in this case)?

Thank you,
Patrick
One of the problems I see is that ownership for all the backups will be root under cPanel Backups, like /backup/cpbackup/weekly. Is this for all or one? One would not be hard to do. If you want to copy all backups to a remote server I would use rsync.
 

RickG

Well-Known Member
Feb 28, 2005
238
2
168
North Carolina
In instances where I've wanted to give an FTP user access to a folder above the /home/AccountName/public_html directory, here's what I've done ...

1) Create a new FTP Account via the FTP Manager

2) Initially accept the default directory the system wants to create (which is under /public_html)

3) SSH into the server and edit the file /etc/proftpd/accountname. The files are stored under /etc/proftpd even if you are using pure-ftpd on the server (at least on my system).

4) In this file you'll find an entry for the new FTP Account you created in #1. Carefully edit the directory and point it to where you want.

As rhenderson indicated you could run into permission problems depending on your objectives. Either way, knowing how to create an FTP account / user outside of the www directory may be useful down the road.