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

os: OpenFile() and Mkdir() won't create a file/directory with the sticky bit on *BSD #8383

kzys opened this issue Jul 17, 2014 · 3 comments


Copy link

@kzys kzys commented Jul 17, 2014

What does 'go version' print?
go version go1.3 freebsd/amd64

What steps reproduce the problem?
If possible, include a link to a program on

1. Run on FreeBSD

$ cat mkdir.go                                                                  
package main

import (

func main() {
        os.Mkdir("testdir", os.ModeSticky | 0755)
        info, _ := os.Stat("testdir")
        fmt.Printf("%o\n", info.Mode())
$ go run mkdir.go

What happened?

The sticky bit was 0 on testdir.

What should have happened instead?

The sticky bit should be 1. The below is the result on Linux.

$ go run mkdir.go
Copy link

@gopherbot gopherbot commented Jul 17, 2014

Comment 1:

CL mentions this issue.
Copy link

@griesemer griesemer commented Oct 1, 2014

Comment 2:

Labels changed: added repo-main.

Status changed to Started.

Copy link

@rsc rsc commented Dec 22, 2014

There are problems with this fix. See code review.

@rsc rsc reopened this Dec 22, 2014
@rsc rsc closed this in 9c0b145 Mar 20, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.