• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

More chrooted ssh commands

Svobi

New Pleskian
Hiyas!

I can activate chrooted ssh access for domains / domainmasters. The login itself works great but there are only very few commands available for these users. I want to add "tar" and "mysql" commands for such an ssh access that people can extract uploaded files and load larger dumps directly into the mysql database. Any idea where to configure this? Possible to set such addional commands as default values so when I'm creating new domains and ssh access for the new domain masters that I get the same commands there?

It's all about trusted users, no public or unknown ones so I can leave the security thoughts about other commands behind a bit.
 
I found a dir named "/var/www/vhosts/chroot" where the content is similar to the chroot dir of the domain. I guess the new chroot's take all the stuff from there. I managed to copy "tar" into that from my /bin/tar dir as well as into the domain chroot and there it works.

But still the problem that the mysql command doesn't work. I put in the necessary libs into the /var/www/vhosts/chroot/lib dir (and of course the corresponding domain chroot) but in the end when no more lib is missing I get the error:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

I chmodded the my.cnf to 644 and tried even 777 but didn't help. My goal is to provide mysql dump directly into the database via commandline. Any other ideas here to make the mysql work within such a limited chroot?
 
Back
Top