Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running any go command while pwd is a cifs share results in "cannot stat path" error #43452

Closed
copeland3300 opened this issue Dec 31, 2020 · 1 comment

Comments

@copeland3300
Copy link

copeland3300 commented Dec 31, 2020

What version of Go are you using (go version)?

$ go version
go version go1.15.6 linux/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/remote/Go Projects/gopath/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/remote/Go Projects/gopath/"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/snap/go/6745"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/snap/go/6745/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build512394380=/tmp/go-build -gno-record-gcc-switches"
GOROOT/bin/go version: go version go1.15.6 linux/amd64
GOROOT/bin/go tool compile -V: compile version go1.15.6
uname -sr: Linux 4.15.0-124-generic
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.5 LTS
Release:        18.04
Codename:       bionic
/lib/x86_64-linux-gnu/libc.so.6: GNU C Library (Ubuntu GLIBC 2.27-3ubuntu1.3) stable release version 2.27.
gdb --version: GNU gdb (Ubuntu 8.1.1-0ubuntu1) 8.1.1

What did you do?

Running commands such as go env or simply go while in a folder that is a mounted cifs share results in the following error: "cannot stat path of the current working directory: Permission denied"

Tested on various linux systems, but against the same cifs share.

More specifically, I mounted a cifs share using the following:

root@system:# mount -t cifs //172.16.1.100/Share /mnt -o user=user1
root@system:# cd /mnt
root@system:# go
cannot stat path of the current working directory: Permission denied

What did you expect to see?

Standard output of command.

What did you see instead?

cannot stat path of the current working directory: Permission denied

@copeland3300 copeland3300 changed the title Running any go command while in cifs share results in "cannot stat path" error Running any go command while pwd is a cifs share results in "cannot stat path" error Dec 31, 2020
@copeland3300
Copy link
Author

Solved.

The issue seems to be some interaction with apparmor and the snap install of go.

Simply downloading go from the website and using that install works correctly on the cifs share.

@golang golang locked and limited conversation to collaborators Dec 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants