# Panic: listen tcp :80: bind: permission denied

**URL:** <https://forum.golangbridge.org/t/panic-listen-tcp-bind-permission-denied/35455>\
**Category:** Code Review\
**Created:** [May 30, 2024, 8:59am UTC](https://forum.golangbridge.org/t/panic-listen-tcp-bind-permission-denied/35455 "2024-05-30T08:59:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Totun](https://forum.golangbridge.org/user_avatar/forum.golangbridge.org/totun/32/13710_2.png) [@Totun](https://forum.golangbridge.org/u/Totun)\
**Post date:** [May 30, 2024, 8:59am UTC](https://forum.golangbridge.org/t/panic-listen-tcp-bind-permission-denied/35455/1 "2024-05-30T08:59:22Z")

</div>

Hello. I have panic. In windows firewall port 80 ok. Use wsl: Ubuntu. Does this problem in ubuntu?

```auto
func main() {
	http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
		render(w, "test.page.gohtml")
	})

	fmt.Println("Starting front end service on port 80")
	err := http.ListenAndServe(":80", nil)
	if err != nil {
		log.Panic(err)
	}
}

func render(w http.ResponseWriter, t string) {

	partials := []string{
		"./cmd/web/templates/base.layout.gohtml",
		"./cmd/web/templates/header.partial.gohtml",
		"./cmd/web/templates/footer.partial.gohtml",
	}

	var templateSlice []string
	templateSlice = append(templateSlice, fmt.Sprintf("./cmd/web/templates/%s", t))

	for _, x := range partials {
		templateSlice = append(templateSlice, x)
	}

	tmpl, err := template.ParseFiles(templateSlice...)
	if err != nil {
		http.Error(w, err.Error(), http.StatusInternalServerError)
		return
	}

	if err := tmpl.Execute(w, nil); err != nil {
		http.Error(w, err.Error(), http.StatusInternalServerError)
	}
}

```

---

<div class="post-metadata">

**Author:** ![Modestying](https://forum.golangbridge.org/user_avatar/forum.golangbridge.org/modestying/32/15157_2.png) [@Modestying](https://forum.golangbridge.org/u/Modestying)\
**Post date:** [May 30, 2024, 9:40am UTC](https://forum.golangbridge.org/t/panic-listen-tcp-bind-permission-denied/35455/2 "2024-05-30T09:40:15Z")

</div>

try “chmod +x” for binary file

---

<div class="post-metadata">

**Author:** ![Totun](https://forum.golangbridge.org/user_avatar/forum.golangbridge.org/totun/32/13710_2.png) [@Totun](https://forum.golangbridge.org/u/Totun)\
**Post date:** [May 30, 2024, 10:17am UTC](https://forum.golangbridge.org/t/panic-listen-tcp-bind-permission-denied/35455/3 "2024-05-30T10:17:42Z")

</div>

if you mean `front-end/cmd/web$ chmod +x main.go` not working.(
