# Canister type "custom" getting Permission Denied error

**URL:** <https://forum.dfinity.org/t/canister-type-custom-getting-permission-denied-error/11156>\
**Category:** Command Line Tools\
**Created:** [February 26, 2022, 11:28pm UTC](https://forum.dfinity.org/t/canister-type-custom-getting-permission-denied-error/11156 "2022-02-26T23:28:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fulco](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/fulco/32/910_2.png) [@Fulco](https://forum.dfinity.org/u/Fulco)\
**Post date:** [February 26, 2022, 11:28pm UTC](https://forum.dfinity.org/t/canister-type-custom-getting-permission-denied-error/11156/1 "2022-02-26T23:28:04Z")

</div>

I’m trying to build a general canister that people can use to embed their frontend into the canister binary instead of using the asset canister.

> **[GitHub - ocluf/embedded-frontend-canister: A canister which has the frontend...](https://github.com/ocluf/embedded-frontend-canister)**
>
> A canister which has the frontend embedded into the wasm binary - GitHub - ocluf/embedded-frontend-canister: A canister which has the frontend embedded into the wasm binary

I’m trying to copy the same mechanism as in the nns dapp [nns-dapp/dfx.json at main · dfinity/nns-dapp · GitHub](https://github.com/dfinity/nns-dapp/blob/main/dfx.json) with a custom build script that creates a .tar of the frontend assets. However when I try to use the “custom” canister type I get the following error:

`thread 'main' panicked at 'Could not run custom tool.: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }', src/dfx/src/lib/builders/custom.rs:207:31`

When I look at the source code of the SDK the line numbers don’t go that far. Does anybody know where that error could come from?

> <https://github.com/dfinity/sdk/blob/master/src/dfx/src/lib/builders/custom.rs>

---

<div class="post-metadata">

**Author:** ![paulyoung](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/paulyoung/32/5251_2.png) [@paulyoung](https://forum.dfinity.org/u/paulyoung)\
**Post date:** [February 27, 2022, 12:25am UTC](https://forum.dfinity.org/t/canister-type-custom-getting-permission-denied-error/11156/2 "2022-02-27T00:25:28Z")

</div>

I think you’d need to try looking at the tag of an older version, e.g.

> <https://github.com/dfinity/sdk/blob/066c0f9951ed1f03b747d52f323fd6338b814e55/src/dfx/src/lib/builders/custom.rs#L207>

---

<div class="post-metadata">

**Author:** ![Fulco](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/fulco/32/910_2.png) [@Fulco](https://forum.dfinity.org/u/Fulco)\
**Post date:** [February 27, 2022, 9:28am UTC](https://forum.dfinity.org/t/canister-type-custom-getting-permission-denied-error/11156/3 "2022-02-27T09:28:22Z")

</div>

For anyone seeing this in the future I had to make the build,sh script executable with:

chmod +x build.sh
