node.jscpanelpassengerphusion

Node.js web application => Error: EACCES: permission denied, open '/opt/cpanel/ea-ruby27/root/usr/share/passenger/helper-scripts/error.log'


When I was developing my web application in my VSCode, everything was working perfectly fine. Then I deployed it to my web hosting service and I get this error. Does anyone know how I can fix this issue?

This particular web application (Node.js application) is deployed on a subdomain whereas I have another application on my main domain created with React.js that does not encounter this issue.

This is my first time asking dev questions, so if there's any further information needed, just ask :)

The error on my website


Solution

  • As you see, this is permission error. If my guess is right, it seems you developed on windows and going to deploy it on Linux server. Usually, you don't get permission error on windows but on Linux, we often see that kinds of permission errors. try this

    chmod 777 (directory path of log file)
    

    for example, if you are on Ubuntu, and the log file is in "share/log/log.txt"

    sudo chmod 777 share/log -R
    

    check this link here