Skip to content

can not open queue because of permission denied #23

Description

@bilxio

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions