Shiny-Server - Permissions error?

1,216 views
Skip to first unread message

Jeremiah Coleman

unread,
Feb 7, 2013, 1:49:25 PM2/7/13
to shiny-...@googlegroups.com
After starting shiny-server and attempting to access the app, I get this message:


[2013-02-07 13:43:33.804] [ERROR] shiny-server - Error attempting to change permissions on log file at /var/shiny-server/log/test_app-shiny-20130207-134333-34402.log: EPERM, fchown
[2013-02-07 13:43:33.805] [ERROR] shiny-server - Uncaught exception: Error: write EPIPE

/usr/local/lib/node_modules/shiny-server/lib/main.js:201
  throw err;
        ^

I'm running it as user 'shiny', and have read/write permissions set. Any ideas on what is causing it?

Jeremiah Coleman

unread,
Feb 7, 2013, 2:39:48 PM2/7/13
to shiny-...@googlegroups.com
Small update: logged out and back in. No longer get the permissions error on the log file, but I do get the second error. Also accidentally left a couple of lines out - here's the complete error:

[2013-02-07 14:37:50.016] [ERROR] shiny-server - Uncaught exception: Error: write EPIPE


/usr/local/lib/node_modules/shiny-server/lib/main.js:201
  throw err;
        ^
Error: write EPIPE
    at errnoException (net.js:770:11)
    at Object.afterWrite (net.js:594:19)

Joe Cheng

unread,
Feb 7, 2013, 6:33:30 PM2/7/13
to shiny-...@googlegroups.com
You need to run the shiny-server program itself as root (then shiny-server will spawn R processes under the user "shiny"). Is that what you're doing?


--
You received this message because you are subscribed to the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discus...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Jeremiah Coleman

unread,
Feb 8, 2013, 7:29:46 AM2/8/13
to shiny-...@googlegroups.com
I guess that would be my problem. However, new one: when I try to run as root, I get this error:

/usr/bin/env: node: No such file or directory

I looked this error up on the Node group. They say it's normally caused by a misnaming error, however the reference is named node so it should be working. It also obviously works (to a point) when running as non-root.

Jeremiah Coleman

unread,
Feb 8, 2013, 9:38:40 AM2/8/13
to shiny-...@googlegroups.com
Got it - needed to create a symlink in /usr/bin.

Joe Cheng

unread,
Feb 8, 2013, 10:32:00 AM2/8/13
to shiny-...@googlegroups.com
What Linux distro are you on? Many of them use a secure path for sudo that doesn't include /usr/local/bin. There are a number of ways around this, I'm not familiar enough to make a recommendation but if you search "sudo secure path" you will find lots of advice. 
--
Sent from my phone

Jeremiah Coleman

unread,
Feb 15, 2013, 7:44:54 AM2/15/13
to shiny-...@googlegroups.com
You are correct Joe. I am using RHEL - I just created a symlink for node in /usr/bin, which was on the sudo path.
To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discuss+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply all
Reply to author
Forward
0 new messages