# ./docker-entrypoint.sh: Permission denied vidly-backend-1 exited with code 126

**URL:** <https://forum.codewithmosh.com/t/docker-entrypoint-sh-permission-denied-vidly-backend-1-exited-with-code-126/22689>\
**Category:** Docker\
**Created:** [September 24, 2023, 10:39am UTC](https://forum.codewithmosh.com/t/docker-entrypoint-sh-permission-denied-vidly-backend-1-exited-with-code-126/22689 "2023-09-24T10:39:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![irfan.farooq](https://avatars.discourse-cdn.com/v4/letter/i/73ab20/32.png) [@irfan.farooq](https://forum.codewithmosh.com/u/irfan.farooq)\
**Post date:** [September 24, 2023, 10:39am UTC](https://forum.codewithmosh.com/t/docker-entrypoint-sh-permission-denied-vidly-backend-1-exited-with-code-126/22689/1 "2023-09-24T10:39:20Z")

</div>

I am getting error while executing docker-compose up command.

Vidly-backend-1 | /usr/local/bin/docker-entrypoint.sh: exec: line 8: ./docker-entrypoint.sh: Permission denied vidly-backend-1 exited with code 126

I added the permission: chmod og+x docker-entrypoint.sh, but still getting ‘permission denied’ error. Also, tried root user in place of app for backend project but still same issue.

Frontend and Db are up and running perfectly, only backend causing issue.

Any help/suggestion will be appreciated.

---

<div class="post-metadata">

**Author:** ![UniqueNospaceShort](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/uniquenospaceshort/32/1814_2.png) [@UniqueNospaceShort](https://forum.codewithmosh.com/u/UniqueNospaceShort)\
**Post date:** [September 24, 2023, 12:05pm UTC](https://forum.codewithmosh.com/t/docker-entrypoint-sh-permission-denied-vidly-backend-1-exited-with-code-126/22689/2 "2023-09-24T12:05:36Z")

</div>

Hi,

Why did you add `x` on `go` and not on `u` ?

Cheers.

---

<div class="post-metadata">

**Author:** ![irfan.farooq](https://avatars.discourse-cdn.com/v4/letter/i/73ab20/32.png) [@irfan.farooq](https://forum.codewithmosh.com/u/irfan.farooq)\
**Post date:** [September 24, 2023, 12:30pm UTC](https://forum.codewithmosh.com/t/docker-entrypoint-sh-permission-denied-vidly-backend-1-exited-with-code-126/22689/3 "2023-09-24T12:30:40Z")

</div>

Hi,  
Because it already has x on u but not for go.

I guess, problem is something else, which I could not resolve yet.

**-rwxr-xr-x@** 1 dev-user staff 160 24 Sep 14:20 **docker-entrypoint.sh**

It has execute (x) permission for all but still getting permission denied error while executing ‘docker-compose up’ command.

---

<div class="post-metadata">

**Author:** ![irfan.farooq](https://avatars.discourse-cdn.com/v4/letter/i/73ab20/32.png) [@irfan.farooq](https://forum.codewithmosh.com/u/irfan.farooq)\
**Post date:** [September 24, 2023, 2:04pm UTC](https://forum.codewithmosh.com/t/docker-entrypoint-sh-permission-denied-vidly-backend-1-exited-with-code-126/22689/4 "2023-09-24T14:04:54Z")

</div>

I resolved the issue, added xwr permissions and it worked.

Some other files was also causing permission issue which are resolved by adding necessary permissions.

---

<div class="post-metadata">

**Author:** ![michael\_nwuju](https://avatars.discourse-cdn.com/v4/letter/m/a698b9/32.png) [@michael\_nwuju](https://forum.codewithmosh.com/u/michael_nwuju)\
**Post date:** [December 3, 2023, 5:49pm UTC](https://forum.codewithmosh.com/t/docker-entrypoint-sh-permission-denied-vidly-backend-1-exited-with-code-126/22689/5 "2023-12-03T17:49:14Z")

</div>

Hi Irfan, please how did you do this? Currently going through the same problem.
