# \[SOLVED\] Golang Deploy Permission Issue

**URL:** <https://forum.serverless.com/t/solved-golang-deploy-permission-issue/8748>\
**Category:** Serverless Framework\
**Tags:** aws, lambda\
**Created:** [July 10, 2019, 3:29pm UTC](https://forum.serverless.com/t/solved-golang-deploy-permission-issue/8748 "2019-07-10T15:29:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![reapz](https://avatars.discourse-cdn.com/v4/letter/r/5daacb/32.png) [@reapz](https://forum.serverless.com/u/reapz)\
**Post date:** [July 10, 2019, 3:29pm UTC](https://forum.serverless.com/t/solved-golang-deploy-permission-issue/8748/1 "2019-07-10T15:29:19Z")

</div>

Hi there,

I have just started using Serverless (v1.47.0) and am having trouble with the Golang examples on Windows 10.

I am getting this error from when I invoke the deployed hello and world functions from the default Go files created by serverless.

```auto
{                                                                      
    "errorMessage": "fork/exec /var/task/bin/hello: permission denied",
    "errorType": "PathError"                                           
}

```

I believe I am facing an issue that was supposedly fixed quite awhile ago as shown here:

> <https://github.com/serverless/serverless/issues/5614>

And fixed here:

> <https://github.com/serverless/serverless/pull/5813>

If I open the uploaded zip in 7zip, the permissions for both compiled go files are **-rw-rw-rw-** so not executable?

Hopefully I’ve just missed something obvious but following the example instructions just doesn’t work for me.

---

<div class="post-metadata">

**Author:** ![reapz](https://avatars.discourse-cdn.com/v4/letter/r/5daacb/32.png) [@reapz](https://forum.serverless.com/u/reapz)\
**Post date:** [July 11, 2019, 2:18am UTC](https://forum.serverless.com/t/solved-golang-deploy-permission-issue/8748/2 "2019-07-11T02:18:43Z")

</div>

So I worked around the issue and got it working! 🥳

I feel like this should be much smoother OOTB so please let me know if I’ve missed something obvious.

Here is what I did to get the functions uploading with executable permissions.

**Install build-lambda-zip**

```auto
go.exe get -u github.com/aws/aws-lambda-go/cmd/build-lambda-zip

```

**makefile**

```auto
.PHONY: build clean deploy

build:
	dep ensure -v
	env GOOS=linux go build -ldflags="-s -w" -o bin/hello hello/main.go
	env GOOS=linux go build -ldflags="-s -w" -o bin/world world/main.go
	${GOPATH}\bin\build-lambda-zip.exe -o bin/hello.zip bin/hello
	${GOPATH}\bin\build-lambda-zip.exe -o bin/world.zip bin/world

clean:
	rm -rf ./bin ./vendor Gopkg.lock

deploy: clean build
	sls deploy --verbose

```

**serverless.yml**

```auto
frameworkVersion: '>=1.28.0 <2.0.0'

provider:
  name: aws
  runtime: go1.x

package:
  individually: true

functions:
  hello:
    handler: hello
    events:
      - http:
          path: hello
          method: get
    package:
      artifact: bin/hello.zip
  world:
    handler: world
    events:
      - http:
          path: world
          method: get
    package:
      artifact: bin/world.zip

```
