Bench Build error v13


When i run bench build command, it shows following error and not completing.

frappe@erp:~/frappe-bench$ bench build
Retrieving assets...

✔ Downloaded Frappe assets from

Extracting assets...

✔ Restored js/frappe-web.min.js
✔ Restored js/control.min.js
✔ Restored js/
✔ Restored js/dialog.min.js
✔ Restored js/form.min.js
✔ Restored js/report.min.js
✔ Restored js/
✔ Restored js/
✔ Restored js/
✔ Restored js/
✔ Restored js/data_import_tools.min.js
✔ Restored js/moment-bundle.min.js
✔ Restored js/user_profile_controller.min.js
✔ Restored js/
✔ Restored js/frappe-recorder.min.js
✔ Restored js/chat.js
✔ Restored js/
✔ Restored js/checkout.min.js
✔ Restored js/
✔ Restored js/web_form.min.js
✔ Restored js/desk.min.js
✔ Restored js/
✔ Restored js/libs.min.js
✔ Restored js/
✔ Restored js/
✔ Restored js/bootstrap-4-web.min.js
✔ Restored js/barcode_scanner.min.js
✔ Restored js/
✔ Restored js/
✔ Restored js/list.min.js
✔ Restored js/
✔ Restored js/
✔ Restored css/report.min.css
✔ Restored css/frappe-rtl.css
✔ Restored css/web_form.css
✔ Restored css/rollup.manifest.css
✔ Restored css/email.css
✔ Restored css/desk.min.css
✔ Restored css/frappe-chat-web.css
✔ Restored css/login.css
✔ Restored css/printview.css
✔ Restored css/frappe-web-b4.css
Traceback (most recent call last):
  File "/usr/lib/python3.6/", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/", line 85, in _run_code
    exec(code, run_globals)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/", line 101, in <module>
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/", line 18, in main
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/click/", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/click/", line 782, in main
    rv = self.invoke(ctx)
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/click/", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/click/", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/click/", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/click/", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/", line 37, in build, app=app, make_copy=make_copy, restore=restore, verbose=verbose, skip_frappe=skip_frappe)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 216, in bundle
    make_asset_dirs(make_copy=make_copy, restore=restore)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 324, in make_asset_dirs
  File "/home/frappe/frappe-bench/env/lib/python3.6/", line 486, in rmtree
    _rmtree_safe_fd(fd, path, onerror)
  File "/home/frappe/frappe-bench/env/lib/python3.6/", line 424, in _rmtree_safe_fd
    _rmtree_safe_fd(dirfd, fullname, onerror)
  File "/home/frappe/frappe-bench/env/lib/python3.6/", line 444, in _rmtree_safe_fd
    onerror(os.unlink, fullname, sys.exc_info())
  File "/home/frappe/frappe-bench/env/lib/python3.6/", line 442, in _rmtree_safe_fd
    os.unlink(name, dir_fd=topfd)
PermissionError: [Errno 13] Permission denied: 'responsive.css'

Have you tried “sudo bench build” ?

Yes, same error.

Did you try hard reset.
It seems like you are having a permission issues on this file “responsive.css”

how to hard reset?

i did reboot, bench restart every thing, still same error, also i found file responsive.css and i think its not belong to erpnext.
also i checked permissions of files are 777, i also tried with root user to run bench build but same error.

**frappe@erp** : **~** $ locate responsive.css

these files are owned by some other user.