Rymfony icon indicating copy to clipboard operation
Rymfony copied to clipboard

Handle root user

Open pocky opened this issue 4 years ago • 3 comments

Hello,

I'm using Rymfony through Docker and I have two errors related to root user.

Sudo

sudo is required for certificate (not really a problem but sudo should not be required for root)

fpm-conf.ini

Server can't start because of fpm config. fpm-conf.ini should be updated on lines 17 and 18

user = www-data
group = www-data

Error:

rymfony server:start
 2021-03-23T16:38:21.937Z  INFO > Starting PHP...
 2021-03-23T16:38:21.986Z  INFO > Using php-fpm
 2021-03-23T16:38:21.987Z  INFO > Running php-fpm with PID 389
[23-Mar-2021 16:38:22] ALERT: [pool www] user has not been defined
[23-Mar-2021 16:38:22] ERROR: failed to post process the configuration
[23-Mar-2021 16:38:22] ERROR: FPM initialization failed
thread 'main' panicked at 'PHP server exited with exit code: 78', src/php/php_server.rs:69:29
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

pocky avatar Mar 23 '21 17:03 pocky

Hi @pocky,

Thanks for you report.

When you use Rymfony into Doker container, the CA sertificate installation is not needed. The installation is neede on development computer to accept the selfsigned certificate with curl and web browser.

For the PHP FPM user error, I can propose you a litle twik:

  1. run the command rymfony serve
  2. locate the php-fpm.ini file into /root/.rymfony/<hash256(path of project)>
  3. put at the en the user and group configuration. Like echo "user = www-data" >> /root/.rymfony/<hash256(path of project)>/php-fpm.ini and echo "group = www-data" >> /root/.rymfony/<hash256(path of project)>/php-fpm.ini

This twik is acceptable before patch Rymfony?

(I'm not project maintainer, I can only propose a patch to solve this issue)

macintoshplus avatar Mar 25 '21 14:03 macintoshplus

Hello @macintoshplus

The fpm trick sounds good to me because it's exactly what I'm doing :)

pocky avatar Mar 25 '21 15:03 pocky

I think this is a good opportunity to start thinking about a rymfony config command, or similar 😉

Pierstoval avatar Apr 02 '21 10:04 Pierstoval