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

Need Help - operation not permitted #32

Closed
sountharcs opened this issue Nov 26, 2014 · 1 comment
Closed

Need Help - operation not permitted #32

sountharcs opened this issue Nov 26, 2014 · 1 comment

Comments

@sountharcs
Copy link

Hi ,
i tried to understand example/hello. what i did is this :
mkdir Test
./hello Test

In another terminal i run this program :

    fp, err := os.OpenFile("Test/file.txt",os.O_RDONLY,0644)
if err != nil {
    fmt.Println(err)
    os.Exit(0)
}
for {
    line, err := br.ReadString('\n')
    if err != nil {
        fmt.Println(line,err)
        break
    }
    fmt.Println(line)
}
fp.Close()

It works as expected.
then i change the code to :

    fp, err := os.OpenFile("Test/file.txt",os.O_WRONLY,0644)
if err != nil {
    fmt.Println(err)
    os.Exit(0)
}
fp.WriteString("Hi Golang")
fp.Close()

It says open Test/file.txt: operation not permitted.

then i did ls Test. Nothing it shows.
i dont understand whats happening.

@hanwen
Copy link
Owner

hanwen commented Dec 10, 2014

the example does

if flags&fuse.O_ANYWRITE != 0 {
    return nil, fuse.EPERM
}

@hanwen hanwen closed this as completed Dec 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants