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

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

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

Related

How can I fix IISNode internal server error? listen EACCESS permission denied

I added a node application as a website on IIS with a web config file and whenever I try to browse the website it gives this error:
Error on web browser.
I have tried using the taskkill command to stop the process listening to this port and I also tried giving IIS_IUSRS user full permission on the root folder, but this issue persists
web.config file:
config file image
So I was able to find my way around this issue. I removed the application from IIS and I used pm2 to start the node application and I didn't encounter any error after using this approach.

permission error when trying to run node server in godaddy

im trying to run a nodejs server on godaddy using the cpanel thing. i followed this tutorial, and got to the part where you run the server file. however, the server gives me a permission error.
there may be something wrong with my file structure, or the tutorial may be out of date, as my file structure differed from that in the tutorial. ex: tutorial said to go to /home/username/public_html, but my public_html folder is located on the root folder.
Update:
i just found that i could change file permissions, and enable the execute option on the node file. i'm now getting a segmentation fault error
if you need any extra information, let me know.

apache2 on ubuntu webserver rejects permission to access any other file than the delivered index.html

I am trying to set up a webserver running on Ubuntu. I have installed Apache and changed the root directory to an other directory within /var/www/. When I copy the index.html provided by Apache to that directory, I can access that file via remote webbrowser. But if I want to use a different index.html file, even really basic ones, I get an error: "Forbidden You don't have permission to access this resource". I have also tried to download that html, alter just a few lines and put it back on to the server with the result that it also shows that error. If I rename the initially provided index.html to index2.html I can still access it. I do not understand how it is possible that only this exact file is working.
I have tried to grant more permissions with Directory and restarted Apache but it won't work. I am rather new to Linux and Apache, can only use the terminal on my webserver and I do not know what else to do. Please help.
Change the permissions on the file, too, not just the folder. Pretty sure this fix it.
For diagnostic correction, allow permission for all by typing:
sudo chmod -R 777 /path/to/index.html

"Unable to perform" issue in IIS Manager (localhost)

When I'm trying to open any app in IIS Manager (local machine) like CGI, Handler mappings etc. I got an error There was an error while performing this operation:
I'm unable to find out this issue.
I installed the hosting bundle again. i.e. repair and then checked if the iis_usr has all access for the wwwroot folder.
This resolved the problem for me.

Error: ENOENT, no such file or directory './assets'

After setting up koa-static-folder, my image loads great when I test over localhost with http://localhost:3000/assets/myimage.jpg
But after deploying our node code to an Ubuntu server, we get:
Error: ENOENT, no such file or directory './assets'
What's Ubuntu's issue here? Not sure how to resolve this.
The code that is working locally is:
var koa = require('koa')(),
serve = require('koa-static-folder');
koa.use(serve('./assets'));
Sounds like a permission issue (but I could be wrong!) such that the user that node.js is running under does not have access rights to the assets folder. If this is the problem you have to change access permissions to the folder (see chmod) or run node.js as a user that has the access rights.
If the server isn't publicly accessible you could run the application as sudo to verify if it is a permissions problem or not. Note that using sudo is not a long term solution since it is highly irresponsible/unsecure to run the application as the root user.

Resources