{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/29106","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/29106/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/29106/comments","events_url":"https://api.github.com/repos/golang/go/issues/29106/events","html_url":"https://github.com/golang/go/issues/29106","id":387544709,"node_id":"MDU6SXNzdWUzODc1NDQ3MDk=","number":29106,"title":"Access is Denied when trying to os.rename a file","user":{"login":"LinkyDev","id":21047002,"node_id":"MDQ6VXNlcjIxMDQ3MDAy","avatar_url":"https://avatars2.githubusercontent.com/u/21047002?v=4","gravatar_id":"","url":"https://api.github.com/users/LinkyDev","html_url":"https://github.com/LinkyDev","followers_url":"https://api.github.com/users/LinkyDev/followers","following_url":"https://api.github.com/users/LinkyDev/following{/other_user}","gists_url":"https://api.github.com/users/LinkyDev/gists{/gist_id}","starred_url":"https://api.github.com/users/LinkyDev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LinkyDev/subscriptions","organizations_url":"https://api.github.com/users/LinkyDev/orgs","repos_url":"https://api.github.com/users/LinkyDev/repos","events_url":"https://api.github.com/users/LinkyDev/events{/privacy}","received_events_url":"https://api.github.com/users/LinkyDev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-12-05T00:50:51Z","updated_at":"2018-12-05T02:07:17Z","closed_at":null,"author_association":"NONE","body":"<!-- Please answer these questions before submitting your issue. Thanks! -->\r\n\r\n### What version of Go are you using (`go version`)?\r\n\r\n<pre>\r\ngo version go1.11.2 windows/amd64\r\n</pre>\r\n\r\n### Does this issue reproduce with the latest release?\r\n\r\nYes\r\n\r\n### What operating system and processor architecture are you using (`go env`)?\r\n\r\n<details><summary><code>go env</code> Output</summary><br><pre>\r\nset GOARCH=amd64\r\nset GOBIN=\r\nset GOCACHE=C:\\Users\\omerd\\AppData\\Local\\go-build\r\nset GOEXE=.exe\r\nset GOFLAGS=\r\nset GOHOSTARCH=amd64\r\nset GOHOSTOS=windows\r\nset GOOS=windows\r\nset GOPATH=C:\\Users\\omerd\\go\r\nset GOPROXY=\r\nset GORACE=\r\nset GOROOT=C:\\Go\r\nset GOTMPDIR=\r\nset GOTOOLDIR=C:\\Go\\pkg\\tool\\windows_amd64\r\nset GCCGO=gccgo\r\nset CC=gcc\r\nset CXX=g++\r\nset CGO_ENABLED=1\r\nset GOMOD=\r\nset CGO_CFLAGS=-g -O2\r\nset CGO_CPPFLAGS=\r\nset CGO_CXXFLAGS=-g -O2\r\nset CGO_FFLAGS=-g -O2\r\nset CGO_LDFLAGS=-g -O2\r\nset PKG_CONFIG=pkg-config\r\nset GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\\Users\\omerd\\AppData\\Local\\Temp\\go-build225487594=/tmp/go-build -gno-record-gcc-switches\r\n</pre></details>\r\n\r\n### What did you do?\r\n\r\n<!--\r\n\r\n-->\r\nmain.go  https://play.golang.org/p/byFvCdNZ6WA\r\nserver-config-handler.go https://play.golang.org/p/NT0YNaDCzfh\r\nserver-config.json https://play.golang.org/p/f0MMU9F7t6-\r\n\r\n\r\nIm trying to create an http website server that has the ability to upload files and save them on the server storage\r\n\r\n**After troubleshooting for 2hours I believe the problem is somehow connected to the os.Rename permission (Im a new Go programmer so I dont know for sure)**\r\n\r\n### What did you expect to see?\r\nExpected to see the newly created file moved to the \"/srv/file-storage/testdir/\" folder\r\n\r\n\r\n### What did you see instead?\r\n2018/12/05 02:34:58 test.txt\r\nFile created succesffuly\r\n2018/12/05 02:34:58 Wrote 617 bytes.\r\n2018/12/05 02:34:58 rename test.txt /srv/file-storage/testdir/: Access is denied.\r\n2018/12/05 02:34:58 An error occurred while renaming the file directory! ERROR:004\r\nexit status 2\r\n"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/444331412","html_url":"https://github.com/golang/go/issues/29106#issuecomment-444331412","issue_url":"https://api.github.com/repos/golang/go/issues/29106","id":444331412,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NDMzMTQxMg==","user":{"login":"LinkyDev","id":21047002,"node_id":"MDQ6VXNlcjIxMDQ3MDAy","avatar_url":"https://avatars2.githubusercontent.com/u/21047002?v=4","gravatar_id":"","url":"https://api.github.com/users/LinkyDev","html_url":"https://github.com/LinkyDev","followers_url":"https://api.github.com/users/LinkyDev/followers","following_url":"https://api.github.com/users/LinkyDev/following{/other_user}","gists_url":"https://api.github.com/users/LinkyDev/gists{/gist_id}","starred_url":"https://api.github.com/users/LinkyDev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LinkyDev/subscriptions","organizations_url":"https://api.github.com/users/LinkyDev/orgs","repos_url":"https://api.github.com/users/LinkyDev/repos","events_url":"https://api.github.com/users/LinkyDev/events{/privacy}","received_events_url":"https://api.github.com/users/LinkyDev/received_events","type":"User","site_admin":false},"created_at":"2018-12-05T02:07:17Z","updated_at":"2018-12-05T02:07:17Z","author_association":"NONE","body":"> > When I wrote `my-new-file` I meant that it would be the name of some real file.\r\n> \r\n> When I try this command:\r\n> \"mv test.txt /srv/file-storage/testdir/\" its gives me an error - \"mv: cannot move 'test.txt' to '/srv/file-storage/testdir/': No such file or directory\"\r\n> \r\n> But, when I try \"mv test.txt /c/srv/file-storage/testdir/\" it moves it with no problem\r\n\r\nI tried changing the \"server-directory\" to C:/srv/file-storage/testdir or /c/srv/file-storage/testdir but still the same issue"}}
{"actor":{"display_login":"LinkyDev"}}