Access backups via FTP client?
Hi
/etc/redhat-release:CentOS Linux release 7.6.1810 (Core)
/usr/local/cpanel/version:11.78.0.12
/var/cpanel/envtype:standard
CPANEL=release
I have a 2nd hard disk - /dev/sdb1 - that is mounted as /backup (/dev/sdb1 on /backup type ext4 (rw,relatime,data=ordered))
I have created one directory per cPanel account on /backup as /backup/cpanel_username_backups
I have changed the group and owner of the /backup/cpanel_username_backups directory to be that of the cpanel user, and it has permissions of rwxr-wr-w.
I have created a symlink to the /backup/cpanel_username_backups directory in the cpanel users home directory as /home/cpanel_user/_backup and the link has permissions of lrwxrwxrwx and has group and owner of the cpanel user.
If I set the SSH/Terminal settings to be a jailshell via WHM / Manage Shell Access then:
an ls listing shown the _backups directory as white text on a red background and shows that is it a symlink to /backup/cpanel_username_backups.
an attempt to cd into the _backups directory fails with a 'no permission' error.
If I run a php script that writes to the _backups directory from the terminal, then I get a 'no permission' error.
If I run the same php script from cron (with no SHELL= line), I get the same failure. Cron tasks that don't not need to write to the _backups directory run successfully.
If I run the same php script from cron (with no SHELL="/bin/bash" line), I get the same failure. Cron tasks that don't not need to write to the _backups directory run successfully.
If I run the same script from a browser session, then it works and a backup file is created.
If I connect using an ftp client (FileZilla_), I can't cd into the _backups directory.
If I set the SSH/Terminal settings to be a normal shell via WHM / Manage Shell Access then:
an ls listing shown the _backups directory as a symlink to /backup/cpanel_username_backups.
an attempt to cd into the _backups directory works and I can see all the files in that directory.
If I run a php script that writes to the _backups directory, it succeeds.
If I run the same script from cron (with no SHELL= line), it succeeds.
If I run the same script from cron (with no SHELL="/bin/bash" line), it succeeds.
If I run the same script from a browser session, then it works an a backup file is created.
If I connect using an ftp client (FileZilla_), I can't cd into the __backups directory.
So, how can I use a jailshell and still run cron jobs that need to write to the _backups directory?
How can I get access to the _backups directory via an ftp client?
Many thanks
-
Hi I have a new disk - /dev/sdb1 mounted as /backup. For each cpanel account, I want to let an FTP user, jailed shell user, cron user and website user read and write to individual directories on /backup. How can I achieve this? 0
Please sign in to leave a comment.
Comments
2 comments