Error: spawn EACCES in ubuntu for node.js/express app trying to run python
<p>I have made a node.js server to run a python script using <a href="https://github.com/extrabacon/python-shell" rel="nofollow noreferrer">python-shell </a> and am encountering an EACCES error ever since migrating from windows to Ubuntu. I have to my knowledge and limited ability tried to set the correct permissions to no avail, and have not currently found anyone with a problem such as this with a server trying to run another script. My question is how do I stop such an error occuring?</p>

<p>EDIT: Added JavaScript code, Image of ls-l in main server folder, and js script folder.</p>

<p>Express HTML error log (modified):</p>

<pre><code>&lt;h1&gt;spawn EACCES&lt;/h1&gt;
&lt;h2&gt;&lt;/h2&gt;
&lt;pre&gt;Error: spawn EACCES
    at exports._errnoException (util.js:870:11)
    at ChildProcess.spawn (internal/child_process.js:298:11)
    at exports.spawn (child_process.js:362:9)
    at new PythonShell (/home/user_name/simple_server/node_modules/python-shell/index.js:59:25)
    at run_py_script (/home/user_name/simple_server/routes/rain_track.js:11:19)
    at /home/user_name/simple_server/routes/rain_track.js:43:5
    at Layer.handle [as handle_request] (/home/user_name/simple_server/node_modules/express/lib/router/layer.js:95:5)
    at next (/home/user_name/simple_server/node_modules/express/lib/router/route.js:131:13)
    at Route.dispatch (/home/user_name/simple_server/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/home/user_name/simple_server/node_modules/express/lib/router/layer.js:95:5)&lt;/pre&gt;
</code></pre>

<p>Javascript code:</p>

<pre><code>var express = require('express');
var router = express.Router();
var PythonShell = require('python-shell');

var options = {
    mode: 'json',
    pythonPath: '/home/user_name/simple_server'
};

function run_py_script(data, res, callback){
    var pyshell = new PythonShell('dummy.py', options);
    console.log(data.latitude + ", " + data.longitude + "\n");
    pyshell.send(""+data.latitude + ", "+ data.longitude+"\n"); // change to data

    pyshell.on('message', function(message){
        console.log(message);
        res.json(message);
    });

    pyshell.end(function(err){
        if (err) {
            console.log("Python script error has occured.");
            console.log(err);
        }
        //return err ? callback(null) : callback(null, ret_val);
    });
}

/* GET rain_track data. */

router.post('/', function(req, res, next) {
    console.log("Location got: "+req.body.coords.latitude + ", " + req.body.coords.longitude);
    var location_data = {
        "latitude" : req.body.coords.latitude,
        "longitude" : req.body.coords.longitude
    };
    run_py_script(location_data, res, function(err, rain_data) {
        if (err){ console.log("error in python script" ); return res.json(null); }
    })
});
module.exports = router;
</code></pre>

<p><code>ls -l</code>:</p>

<p><a href="https://i.stack.imgur.com/RcxZ0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RcxZ0.png" alt="ls -l of directories"></a></p>