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

can not open queue because of permission denied #23

Open
bilxio opened this issue Jul 1, 2022 · 1 comment
Open

can not open queue because of permission denied #23

bilxio opened this issue Jul 1, 2022 · 1 comment

Comments

@bilxio
Copy link

bilxio commented Jul 1, 2022

Hi there,

Recently, I wrote a simple prototype which required a dick-based queue.

After I copied the snippet, and then bad luck, I got an error like:

➜  logpipe (main) ✗ go run main.go
panic: mkdir data/testqueue/index: permission denied

goroutine 1 [running]:
go.example.com/logpipe/app.New()
        /Users/admin/logpipe/app/logpipe.go:48 +0x145
main.main()
        /Users/admin/logpipe/main.go:22 +0x9e
exit status 2

the code snippet like:

var queue = new(bigqueue.FileQueue)

err := queue.Open("data", "testqueue", nil)

if err != nil {
  panic(err)
}
defer queue.Close()

go.mod

require (
	github.com/jhunters/bigqueue v1.2.2
)

finanlly, check the data dir out,

➜  logpipe (main) ✗ ll data 
total 0
d---------  2 admin  staff    64B Jul  1 15:39 testqueue
drwxr-x---  3 admin  staff    96B Jul  1 15:31 wal
➜  logpipe (main) ✗ ll data/testqueue 
total 0
ls: data/testqueue: Permission denied

Thanks.

@bilxio
Copy link
Author

bilxio commented Jul 1, 2022

By the way, there is a pull #21 which covered this issue already.

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

1 participant