Symfony installation in virtual server best pratic

SYSTEM INFORMATION
OS type and version Debian 11
Webmin version 2.011
Virtualmin version 7.5
Related packages SUGGESTED

Hi, excuse me for my stupid question; i’m not able tu install symfony in virtaul server;

like standard linux user i have installed symfony with out problem, but can’t enter in the folder of virtual server like standard user and like virtual server user, comad from shell don’t work;
For example : php -r “copy(‘https://getcomposer.org/installer’, ‘composer-setup.php’);”

actually like standard user , from shell i can launch composer and symfony command ;
is possible ability only this two command for virtualserver user?
how?

thank you
Enrico

I don’t understand what you’re saying you’re doing and and what isn’t working about it.

You haven’t provided any errors or any concrete explanation of what you’re doing. Copy paste the commands you’re running and what happens when you run them.

Ok, sorry,
i want start a fresh symfony installation, i’m starting from symfony documentation wrote here :

for the installation i need installing before composer, following the step wrote here:
https://getcomposer.org/download/

so i enter like super user in wirtualmin interface, select , virtualserver and terminal
in terminal i have usernamevirtualserver@nameserver
I type

 usernamevirtualserver@nameserver #symfony
bash: symfony: command not found

 usernamevirtualserver@nameserver#composer
bash: composer: command not found

 usernamevirtualserver@nameserver#php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
bash: php: command not found

all command don’t work<<<

so i enter by ssh with linux user

#ssh  user@nameserver
user@nameserver#so - usernamevirtualserver
#password: xxxx
 usernamevirtualserver@nameserver# ls
 usernamevirtualserver@nameserver#  Maildir  awstats  cgi-bin  etc  homes  logs  public_html  tmp  virtualmin-backup
 usernamevirtualserver@nameserver#symfony
bash: symfony: command not found
 usernamevirtualserver@nameserver#composer
bash: composer: command not found
 usernamevirtualserver@nameserver#php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
bash: php: command not found

all command don’t work<<<

like linux user , not virtualservuser

 usernamevirtualserver@nameserver# exit
user@nameserver# php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"

php work

user@nameserver#ls
““composer-setup.php”” Desktop Documenti Immagini Modelli Musica Pubblici Scaricati thinclient_drives Video

have donwload composer-setup.php, that i have installed, following i have installed synfony

both work

user@nameserver#php >>work<<
user@nameserver#symfony >>work<<
user@nameserver#composer >>work<<

but i can’t working in virtualserver like another linux user, i can’t working like root, because i’ll create a system with wrong permission

how can solving that?

I hope I explained myself

Enrico

Did you enable a chroot shell for these users? If so, you need to add every command you expect them to use to that jail.

the user have setting shell in /sbin/jk_chrootsh
can you give me the link for documentations to “add every command you expect them to use to that jail.”?
or give me some tips about?

Enrico

If you want to use composer or symfony globally, you will need to copy the binary files into /usr/bin

yes in the root of server , not of in virtualuser root; but not work
at least it doesn’t remove the main user of the virtual server from the chroot, significantly lowering the security of the server.
i installed jailkit manager, i tried to do a couple of configurations without success.
I don’t know if it doesn’t work, I did something wrong, I can’t find the documentation.
Enrico

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.