pterodactyl / panel

Pterodactyl® is a free, open-source game server management panel built with PHP, React, and Go. Designed with security in mind, Pterodactyl runs all game servers in isolated Docker containers while exposing a beautiful and intuitive UI to end users.
https://pterodactyl.io
Other
6.68k stars 1.69k forks source link

composer setup returning error #225

Closed tommyraudy closed 7 years ago

tommyraudy commented 7 years ago

Im istalling the panel on my ubuntu server by following your tutorial video, everything went fine after I write this command curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer but when I type this command, composer setup it showing error

[RuntimeException] /var/www/pterodactyl/html/vendor does not exist and could not be created

and

Script composer install --ansi --no-dev handling the setup event returned with error code 1

Do im doing wrong? Im doing like what i see on your tutorial. btw Im not running the composer command without root or sudo

schrej commented 7 years ago

please check your permissions, my first guess would be the directory can't be created.

tommyraudy commented 7 years ago

thanks but it worked after i run the command as sudo...

DaneEveritt commented 7 years ago

Not an ideal fix, but generally this happens because the folder you're in is owned by www-data or a different user than you're using to run the composer command. You can run it using su and using whatever user as well.

Casper042 commented 1 year ago

The issue is the guide to install makes no mention of needing to change permissions. https://pterodactyl.io/panel/1.0/getting_started.html#download-files So everything for me is mostly owned by root in that /var/www structure.

But then when you run this command: composer install --no-dev --optimize-autoloader It tells you it can't create the Vendor sub as noted above. OK, I will run that as root too

Nope, now you get this error message telling you specifically NOT to run Composer as root. https://getcomposer.org/doc/faqs/how-to-install-untrusted-packages-safely.md

So I feel like the documentation needs to be updated here about how to handle permissions for /var/www as the current instructions simply don't work, as noted by the above which still doesn't seem fixed 7 years later...

dcrespo1 commented 8 months ago

Any update on this issue? im getting the same results as @Casper042

Boy132 commented 8 months ago

You can ignore the warning from composer about running as root.

Also, next time please visit the Discord and ask there instead of reviving a 7 year old github issue.