1

I suddenly got this error at my app which ran without problems for more than two years:

Rails Error: Unable to access log file. Please ensure that .../production.log exists...   
WARN -- : Errno::EACCES: Permission denied @ rb_sysopen .../log/newrelic_agent.log 

The result of this error is that my mongoDB is killed. After I restarted the app everything works again until scheduled tasks are called which lead to that behaviour.

The error message says that i have to chmod to 0664, but this is still the case. For the deployment I use capistrano.

Any ideas?

dan_0
  • 599
  • 1
  • 5
  • 17
  • Are you sure what the log folder is existed on the remove server? I mean is that folder linked by capistrano before Rails server started? – Roman Kiselenko Apr 05 '17 at 09:25
  • Yes the folder exists. like i mentioned. it ran with this configuration for more than two years. – dan_0 Apr 05 '17 at 09:28

2 Answers2

1

Make log directory writable for other users:

chmod -R 777 specify_app_path_here/log
Abhilash Reddy
  • 1,499
  • 1
  • 12
  • 24
0

Now I know the reason for that strange behaviour: Hard Disk Failure !!! Even both Disks were dead at the same time (RAID1) :(

dan_0
  • 599
  • 1
  • 5
  • 17