Shiny Server Open Source: Warrnings from dir.create() regarding caching and permissions

I have numerous shiny server apps in production, and recently I've been seeing an incredible number of warning messages in my logs that look like this for every app I have:

First warning:

Warning in dir.create(cache_dir, recursive = TRUE) : cannot create dir '/srv/shiny-server/[parent_directory]/[subdirectory]/[specific_app_directory]/app_cache', reason 'Permission denied'

Followed by:

Warning in value[[3L]](cond) : Error using cache directory at '/srv/shiny-server/[parent_directory]/[subdirectory]/[specific_app_directory]/app_cache/sass'. Using temp dir instead.

I've done quite a bit of research and googling trying to figure out why all of these warnings are occurring, but I have so far not arrived at a solution. This is not causing any issues with the production apps, it's mostly just a nuisance having to sift through these warning messages in my log files. Based on this post from the RStudio Shiny team, it appears setting the shinyOptions as shinyOptions(cache = cachem::cache_disk("./app_cache/cache/")) is recommended? However, it seems like this may be specific to Shiny Server Pro and not the open source version?

In my /srv/shiny-server/shiny-server.conf file, all apps are run as the shiny user, and this seems like the likely "issue" (that the shiny user does not have the correct permissions). But I'd prefer not opening this user up to more access if possible. I've also been running these apps in production for 3 years and have never had a problem, so I'd like to avoid changing permissions if possible. Any thoughts on how I can fix/remove these warning messages? Any help is much appreciated.

Thanks!

4 Likes

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.