• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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