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

Closed
kzys opened this issue Jul 17, 2014 · 3 comments
Closed

Comments

@kzys
Copy link
Contributor

@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 play.golang.org.

1. Run http://play.golang.org/p/g8Wq83b7VF on FreeBSD

$ cat mkdir.go                                                                  
package main

import (
        "fmt"
        "os"
)

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

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
20004000755
$
@gopherbot
Copy link

@gopherbot gopherbot commented Jul 17, 2014

Comment 1:

CL https://golang.org/cl/102640045 mentions this issue.
@griesemer
Copy link
Contributor

@griesemer griesemer commented Oct 1, 2014

Comment 2:

Labels changed: added repo-main.

Status changed to Started.

@rsc
Copy link
Contributor

@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.
Projects
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.