shiny server | application failed to start | permissions?

[Shiny newb - so phasers set to stun only ;-]

Installing shiny server on CentOS 7 box. Yum installed the latest RPM ( - no problems. Permanently opened up 3838 in firewall. No problem. Used systemctl to start and enable shiny server, using default config (meaning, usual file locations, and usual 3838 port). No problem.

Point browser at, and up pops the sample-apps/hello page.

So, in theory, all good so far.

Problem(s) arise when trying to run a shiny app that isn't one of the sample-apps that comes bundled with the server. Here is what I tried:

1\ on desktop for my main account, created a directory called demo. [demo runs fine using runApp from within an R session - mention this now to prevent the likely 'problem with your R code' suggestion I anticipate...]

2\ then, cd to /srv/shiny-server/sample-apps, and create a symbolic link to the demo directory on my desktop

3\ chown everything to root (also tried shiny, makes no difference).

4\ point browser at, but get the very popular (based on peolle who run into this) 'An error has occurred. The application failed to start. The application exited during initialization'.

5\ so, being well-versed in various things, look at the logs, but see nothing that helps much (typical of most logs...)

 su: ignore --preserve-environment, it's mutually exclusive to --login.
 -bash: line 0: cd: /srv/shiny-server/sample-apps/demo: Permission denied

The 'Permission denied' bit would suggest permissions, but I used the same permissions as the other samples (e.g., hello), so I'm not convinced it is a simple* permissions issue.

The first line puzzles me completely.

At any rate, looking for pointers to the obvious first things to try...

Many thanks in advance.

So, if instead of sym linking to 'demo', I simply physically move (copy) 'demo' into /srv/shiny-server/sample-apps/, it all works fine.

Apparently, shiny-server either can't handly sym linked doirectories, or if it does, there is a config setting I need to tweak.

Most likely you just need to check your permissions again because sample apps are symlinks and they work normally as you have confirmed.

andres@ip-xxx-xx-12-44:/srv/shiny-server$ sudo readlink -f sample-apps
andres@ip-xxx-xx-12-44:~$ ls -l /srv/shiny-server
total 28
lrwxrwxrwx 1 andres shiny-apps   38 feb  3 20:44 index.html -> /opt/shiny-server/samples/welcome.html
lrwxrwxrwx 1 andres shiny-apps   37 feb  3 20:44 sample-apps -> /opt/shiny-server/samples/sample-apps

Well, try as I might, I still don't see any permissions differences, between one of the working sample applications (hello) and my app. I think the issue is related to the fact that hello is physically sitting in


All the apps in this directory are then symlinked from /srv/shiny-server

If I physically put 'demo' into /opt/shiny-server/samples/sample-apps, works fine.

But, what I'm trying to do is run an app that is not physically sitting in /opt/shiny-server/samples/sample-apps. In theory, I should be able to symlink it, regardless of where it sits. But that doesn't seem to work.

What I tried was

1\ cd to /opt/shiny-server/samples/sample-apps

2\ create symlink to demo, which is (say) sitting on a user desktop. Here is what is in /opt/shiny-server/samples/sample-apps

 lrwxrwxrwx 1 root root   23 May 29 08:57 demo -> /home/<user>/Desktop/demo/
 drwxrwxr-x 2 root root 4096 May 28 15:02 hello
 drwxrwxr-x 2 root root 4096 May 28 15:02 rmd

3\ if I cd to /srv /shiny-server, then ls sample-apps

 demo hello rmd

So, 'demo' is listed as one of the sample apps.

Permissions (of the demo directory, and contents of same) all look identical (to, say, hello) -- the only difference is that demo is symlinked from within /opt/shiny-server/samples/sample-apps, rather than being there physically.

I'm wondering if there isn't an issue similar to some of the things you need to do with Apache, to get it to follow symlinks? [In fact, it is a directive - 'FollowSymLinks' - you need to use for various purposes in httpd.conf]

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.