Permission Denied Error while Migrate

while migrating the server, I am getting this error:

builtins.PermissionError: [Errno 13] Permission denied: '/home/frappe/frappe-bench/sites/erp.site.com/logs/database.log'

Solution for this:
what i did:

sudo bench --site [site_name] migrate

Hi @Sudhanshu

Generally, this kind of error occurred because of lack of permission to that user. You can use below command for assigning permission to that user

chmod -R o+rx /home/[frappe-user]

2 Likes