I am getting this error every hour


I am getting this error log every hour, I have no idea why this is happening, could you kindly assist or suggest what might be causing this:

{‘retry’: 0, ‘log’: <function log at 0xb5fd76f4>, ‘site’: u’fox.fwrat.com’, ‘event’: u’hourly’, ‘method_name’: u’frappe.utils.error.collect_error_snapshots’, ‘method’: <function collect_error_snapshots at 0xb5f7041c>, ‘user’: u’Administrator’, ‘kwargs’: {}, ‘async’: True, ‘job_name’: u’frappe.utils.error.collect_error_snapshots’}
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/background_jobs.py”, line 61, in execute_job
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/error.py”, line 181, in collect_error_snapshots
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/error.py”, line 24, in make_error_snapshot
logger = frappe.logger(name, with_more_info=False)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1269, in logger
return get_logger(module or ‘default’, with_more_info=with_more_info)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/logger.py”, line 17, in get_logger
LOG_FILENAME, maxBytes=100000, backupCount=20)
File “/usr/lib/python2.7/logging/handlers.py”, line 117, in init
BaseRotatingHandler.init(self, filename, mode, encoding, delay)
File “/usr/lib/python2.7/logging/handlers.py”, line 64, in init
logging.FileHandler.init(self, filename, mode, encoding, delay)
File “/usr/lib/python2.7/logging/init.py”, line 903, in init
StreamHandler.init(self, self._open())
File “/usr/lib/python2.7/logging/init.py”, line 928, in _open
stream = open(self.baseFilename, self.mode)
IOError: [Errno 13] Permission denied: u’/home/frappe/frappe-bench/logs/frappe.log’

I would appreciate your assistance …

Verify if frappe user have write permissions to /home/frappe/frappe-bench/logs/frappe.log

Thank you almeidapaulopt,

kindly could you tell me how I check the existing permissions for that file and the given user please?

Dear, It has been a long time since I last checked how to give permission to a specific user for a specific file in frappe, kindly could you suggest how i check this? Thanks

Are you execute bench with frappe user?
if so

try execute

chown -hR frappe /home/frappe/frappe-bench/

Thanks for your reply, I followed the installation as given on the website of ERPNEXT and (GitHub - frappe/bench: CLI to manage Multi-tenant deployments for Frappe apps) and did not create any user while going through the installations, I installed the production version

Or for safety reasons how can I check which user I execute the bench under? Thanks

Same Issue is facing by us. How to overcome this?