skeith22
1 year ago

Laravel Echo Server needs root access for ssl cert and key

Posted 1 year ago by skeith22

I'm running it locally on my laptop with SSL enabled.

L A R A V E L  E C H O  S E R V E R

version 1.3.8

⚠ Starting server in DEV mode...

{ Error: EACCES: permission denied, open '/etc/ssl/private/my-domain.dev.key'
    at Object.fs.openSync (fs.js:646:18)
    at Object.fs.readFileSync (fs.js:551:33)
    at /home/skeith/.npm-global/lib/node_modules/laravel-echo-server/dist/server.js:45:25
    at new Promise (<anonymous>)
    at Server.secure (/home/skeith/.npm-global/lib/node_modules/laravel-echo-server/dist/server.js:39:16)
    at /home/skeith/.npm-global/lib/node_modules/laravel-echo-server/dist/server.js:28:23
    at new Promise (<anonymous>)
    at Server.serverProtocol (/home/skeith/.npm-global/lib/node_modules/laravel-echo-server/dist/server.js:26:16)
    at /home/skeith/.npm-global/lib/node_modules/laravel-echo-server/dist/server.js:17:19
    at new Promise (<anonymous>)
    at Server.init (/home/skeith/.npm-global/lib/node_modules/laravel-echo-server/dist/server.js:16:16)
    at /home/skeith/.npm-global/lib/node_modules/laravel-echo-server/dist/echo-server.js:45:26
    at new Promise (<anonymous>)
    at EchoServer.run (/home/skeith/.npm-global/lib/node_modules/laravel-echo-server/dist/echo-server.js:41:16)
    at /home/skeith/.npm-global/lib/node_modules/laravel-echo-server/dist/cli/cli.js:156:18
    at FSReqWrap.oncomplete (fs.js:135:15)
  errno: -13,
  code: 'EACCES',
  syscall: 'open',

so laravel-echo-server start doesn't work properly since it doesn't have permission on

/etc/ssl/certs

and

/etc/ssl/private

Folder user group permissions

drwxr-xr-x   4 root root      4096 Jul 22 05:15 .
drwxr-xr-x 131 root root     12288 Sep  8 13:22 ..
drwxr-xr-x   2 root root     20480 Sep  6 14:24 certs
-rw-r--r--   1 root root     10771 Apr 26 01:03 openssl.cnf
drwx--x---   2 root ssl-cert  4096 Sep  6 14:24 private

did any tried changing its user group and permissions without having problems?

Please sign in or create an account to participate in this conversation.