From 364c520d4d47a5edcf6f0e79e42757477b51d33d Mon Sep 17 00:00:00 2001 From: Tom Clegg Date: Thu, 5 Jan 2017 12:42:04 -0500 Subject: [PATCH] 10808: Move comment. --- services/api/config/application.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/services/api/config/application.rb b/services/api/config/application.rb index e7002ddf1a..d3fee8ea19 100644 --- a/services/api/config/application.rb +++ b/services/api/config/application.rb @@ -36,10 +36,12 @@ module Server I18n.enforce_available_locales = false + # Before using the filesystem backend for Rails.cache, check + # whether we own the relevant directory. If we don't, using it is + # likely to either fail or (if we're root) pollute it and cause + # other processes to fail later. default_cache_path = Rails.root.join('tmp', 'cache') if not File.owned?(default_cache_path) - # If we don't own the cache dir, using it will either fail or - # (if we're root) pollute it so other processes fail later. STDERR.puts("Defaulting to memory cache, because #{default_cache_path} " \ "owner (uid=#{File::Stat.new(default_cache_path).uid}) " \ "is not me (uid=#{Process.euid})") -- 2.30.2