shiny-server returning 'Not found' on apps

When visiting a shiny app, eg http://server-ip:3838/sample-apps/hello, I'm getting 'Not Found' error.

But, when visiting my shiny app(I put on /srv/shiny-server/app.R), eg http://server-ip:3838/, it is working.

How can i fix this error when i put my apps on the folder (/srv/shiny-server/XXXX)

have you checked your logs (/var/log/shiny-server/)? have you checked permissions on that particular folder?

@andresrcs thanks for your reply.
i had checked my shiny-server logs, there was nothing.
could you tell me how can i check permissions for any particular folder?

ls -ld /srv/shiny-server/sample-apps

it display
1rwxrwxrwx 1 root root /srv/shiny-server/sample-apps -> /opt/shiny-server/samples/samples-apps

it means I have the permission for this folder?

Yes, but that is a symlink to the actual folder, what is the output of ls -ld /opt/shiny-server/samples/sample-apps?

The output is
drwxrwxr-x 5 account root 4096 Dec 11 11:09 /opt/shiny-server/samples/sample-apps/

You have proper permissions, It seems like the symlink is not working, but if you place an app within a folder in /srv/shiny-server/ it should be no problem, have you tried doing so?.

20 posts were split to a new topic: Shiny server gives "Page not found" selectively to a specific parent directory

I place my own app.R within a folder in /srv/shiny-server/account , and I try to get http://server-ip:3838/account but it also get not found error like http://server-ip:3838/sample-apps/hello

Have you set ownership and permissions for that folder?

sudo chown -R root:shiny-apps /srv/shiny-server/account

If you have defaul settings in your shiny-server.conf file and you are logged as root (or you can change root for your user) you can reset ownership and permissions for shiny-server with this.

sudo groupadd shiny-apps
sudo usermod -aG shiny-apps root
sudo usermod -aG shiny-apps shiny
cd /srv/shiny-server
sudo chown -R root:shiny-apps .
sudo chmod g+w .
sudo chmod g+s .

When I input the last 3 lines, I get the error chown: missing operand after ‘root:shiny-apps’, chmod: missing operand after ‘g+w’ and chmod: missing operand after ‘g+s’

I'm very appreciate your reply. and here is my shiny-server.conf

run_as shiny;

# Define a server that listens on port 3838
server {
  listen 3838;

  # Define a location at the base URL
  location / {

    # Host the directory of Shiny Apps stored in this directory
    site_dir /srv/shiny-server;

    # Log all Shiny output to files in this directory
    log_dir /var/log/shiny-server;

    # When a user visits the base URL rather than a particular application,
    # an index of the applications available in this directory will be shown.
    directory_index on;
  }
}

Are you including the dots at the end of each command? and are you in the /srv/shiny-server folder?

yes, I'm in the /srv/shiny-server and I input the last 3 commends including dots again, it works. but I also get not found error on http://server-ip:3838/account

What is the result of running ls -la when you are in /srv/shiny-server folder?

Here is my output

total 96
drwxrwsr-x 26 root shiny-apps  4096 Dec 10 04:04 .
drwxr-xr-x  5 root root        4096 Nov 26 12:45 ..
drwxr-xr-x  2 root shiny-apps  4096 Dec 10 04:04 01_hello
drwxr-xr-x  2 root shiny-apps  4096 Dec 10 04:04 02_text
drwxr-xr-x  2 root shiny-apps  4096 Dec 10 04:04 03_reactivity
drwxr-xr-x  2 root shiny-apps  4096 Dec 10 04:04 04_mpg
drwxr-xr-x  2 root shiny-apps  4096 Dec 10 04:04 05_sliders
drwxr-xr-x  2 root shiny-apps  4096 Dec 10 04:04 06_tabsets
drwxr-xr-x  2 root shiny-apps  4096 Dec 10 04:04 07_widgets
drwxr-xr-x  4 root shiny-apps  4096 Dec 10 04:04 08_html
drwxr-xr-x  2 root shiny-apps  4096 Dec 10 04:04 09_upload
drwxr-xr-x  2 root shiny-apps  4096 Dec 10 04:04 10_download
drwxr-xr-x  2 root shiny-apps  4096 Dec 10 04:04 11_timer
drwxr-xr-x  2 root shiny-apps  4096 Nov 26 16:15 account
-rw-r--r--  1 root shiny-apps 33040 Dec  5 09:26 app.R
lrwxrwxrwx  1 root shiny-apps    38 Nov 21 08:47 index.html -> /opt/shiny-server/samples/welcome.html
drwxr-xr-x  2 root shiny-apps  4096 Nov 26 16:04 rstudio
lrwxrwxrwx  1 root shiny-apps    37 Nov 21 08:47 sample-apps -> /opt/shiny-server/samples/sample-apps

Everything looks in order to me, honestly I don't know what else to try, maybe you should open an issue on their github page

I have figured out the question.
Thank you so much for replying to it.

I put my own app.R on /srv/shiny-server/app.R, and then I will command sudo /opt/shiny-server/bin/deploy-example default. to deploy my own shiny app.
Next, I visit my shiny app http://server-ip:3838/. It is working.

However, I do the same step to particular folder/srv/shiny-server/new_folder, and I'm getting 'Not Found'.
Is there any relations to the command(sudo /opt/shiny-server/bin/deploy-example default)?

This whole thread is getting rather difficult to follow, and I suspect it would be better split into two threads (this forum software can maintain links between topics, so they wouldn't entirely lose context). It sounds like @Sanjmeh's problems are somewhat different from what @zxc40402 is having trouble with, despite some similar symptoms. @Sanjmeh, if you can please propose a more specific title for a topic dedicated to your problem, I will split the thread.