Issue
I´m a real begginer in linux/server/plesk. I had to rent a virtual server Ubunthu to make a test environment.
The company (host) installed automaticaly the Plesk software to help me.
I would like to use a user except root
via ssh to run some command lines with keys php
or composer
.
That works with the user root
but when I connect by my plesk system user via ssh, any command was found :
bash: npm: command not found
bash: php: command not found
etc...
This user is a system user according to Plesk.
Inside the plesk panel, it´s writing this :
Here you can specify an operating system user for managing files and folders within the webspace by FTP or with File Manager. The system user is also used to access Plesk over SSH (on Linux) or RDP (on Windows) if the corresponding permissions are granted.
If I can access Plesk over SSH, that means I can run command line or just use FTP and File Manager ?
How can I get like a root
user all command lines for a plesk user ?
My goal is to get a user which can only run command lines inside the plesk scope ( httpdocs
folder ) and do some actions in the plesk panel, specially in the file manager.
I followed this tutorial for php
but the php
command was not included for my system user.
Solution
In Plesk only "System user" specified in Web Hosting Access can login to the server via SSH, but this user can not login to Plesk and use File manager.
You need to go to Plesk > Domains > example.com > Web Hosting Access and set Access to the server over SSH to /bin/bash
After that you will be able to login to the server via SSH and execute php commands:
# ssh your_sysuser@ip
-bash-4.2$ pwd
/var/www/vhosts/example.com
-bash-4.2$ php -v
PHP 5.4.16 (cli) (built: Apr 12 2018 19:02:01)
-bash-4.2$ /opt/plesk/php/7.2/bin/php -v
PHP 7.2.8 (cli) (built: Jul 20 2018 12:45:27) ( NTS )
Login to Plesk is only possible for Client, Reseller or an additional created user. You need to create an additional user: Plesk > Subscriptions > example.com > User > Create User Account For more information about Users check documentation
Answered By - Elvis Plesky Answer Checked By - Marie Seifert (PHPFixing Admin)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.