1

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.

enter image description here

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

enter image description here

if you need any extra information, let me know.

First Last
  • 21
  • 3
  • chmod +x filename . similarly check node by running this command node -v. To ensure your node binary is able to execute – Senthil Oct 26 '21 at 07:01
  • not sure if im doing what you asked properly or not, but i ran chmod +x app.js and got no output, and ran node -v and got permission denied – First Last Oct 26 '21 at 09:21
  • ill try a different version of node for now – First Last Oct 26 '21 at 09:21
  • That is not related the node version, for the node you need to give execute permission. Ex. chmod +x /home/tpa378rcliql/bin/node – Senthil Oct 26 '21 at 09:24
  • try using `sudo node app.js` maybe node is installed for root users only – SaGaR Oct 26 '21 at 09:27
  • run this command and send the output `cd /home/tpa378rcliql/bin && ls -la | grep node` this command shows you the permissions given to node executable – SaGaR Oct 26 '21 at 09:31
  • sorry for the long reply, here's the output: -rwxr-xr-x 1 tpa378rcliql tpa378rcliql 74274016 Oct 26 02:38 node* – First Last Oct 26 '21 at 09:48
  • also SaGaR it looks like sudo isnt even installed (or im an idiot, i dont know linux well at all). tpa378rcliql@p3plzcpnl487228 [~/bin]$ sudo -v bash: sudo: command not found – First Last Oct 26 '21 at 09:49

0 Answers0