Not able to import data or perform backup

I have hosted ERPNext on a VPS. Data import was working fine earlier. Recently when I tried to import data it is throwing the following error

File “/opt/frappe/erpnext/apps/frappe/frappe/”, line 109, in uploadfile
ret = frappe.utils.file_manager.upload()
File “/opt/frappe/erpnext/apps/frappe/frappe/utils/”, line 36, in upload
file_doc = get_file_doc()
File “/opt/frappe/erpnext/apps/frappe/frappe/utils/”, line 68, in get_file_doc
file_doc = save_uploaded(dt, dn, folder, is_private, df)
File “/opt/frappe/erpnext/apps/frappe/frappe/utils/”, line 77, in save_uploaded
return save_file(fname, content, dt, dn, folder, is_private=is_private, df=df);
File “/opt/frappe/erpnext/apps/frappe/frappe/utils/”, line 135, in save_file
file_data = write_file_method(fname, content, content_type=content_type, is_private=is_private)
File “/opt/frappe/erpnext/apps/frappe/frappe/utils/”, line 165, in save_file_on_filesystem
fpath = write_file(content, fname, is_private)
File “/opt/frappe/erpnext/apps/frappe/frappe/utils/”, line 200, in write_file
** with open(os.path.join(file_path.encode(‘utf-8’), fname.encode(‘utf-8’)), ‘wb+’) as f:**
IOError: [Errno 13] Permission denied: './<site_name_masked>/public/files/Employee.csv’
I have checked the OS permissiion for the frappe user for the folder

[frappe@<server_name_masked> public]$ ls -l
total 4
drwxrwxr-x 2 frappe frappe 4096 Nov 14 17:42 files

Again my backup to the dropbox is failing for the last 2 days

Traceback (most recent call last):
File “/opt/frappe/erpnext/apps/frappe/frappe/integrations/doctype/dropbox_settings/”, line 45, in take_backup_to_dropbox
did_not_upload, error_log = backup_to_dropbox()
File “/opt/frappe/erpnext/apps/frappe/frappe/integrations/doctype/dropbox_settings/”, line 96, in backup_to_dropbox
backup = new_backup(ignore_files=True)
File “/opt/frappe/erpnext/apps/frappe/frappe/utils/”, line 170, in new_backup
delete_temp_backups(older_than = frappe.conf.keep_backups_for_hours or 24)
File “/opt/frappe/erpnext/apps/frappe/frappe/utils/”, line 189, in delete_temp_backups
OSError: [Errno 13] Permission denied: './<Site_Name_masked>/private/backups/20180124_163005-<site_name_masked>-database.sql.gz’

I did not find any permission issue in the server. Please see below:

[frappe@<Server_name_masked> private]$ ls -l
total 8
drwxrwxr-x 2 frappe frappe 4096 Feb 7 06:00 backups
drwxrwxr-x 2 frappe frappe 4096 Dec 19 18:21 files