jhunters / bigqueue

Golang implements for BigQueue
Apache License 2.0
57 stars 23 forks source link

Directories get created with mode 000 #20

Open thias opened 2 years ago

thias commented 2 years ago

I was handed over a project using this library, and when trying to run it, it failed because it was creating all of the queue related directories with mode 000. So the first "queue" directory got created, but then all others failed with "permissions denied". After fixing the mode of "queue" to 0755, the sub-directories would get created, but also with mode 000 so then it was file creation that failed.

This is on Red Hat Enterprise Linux 7, with golang 1.15.5.

Fix/Workaround: Replace all os.ModeDir with 0755 in filequeue.go's calls to os.MkdirAll

I'm not very familiar with Go, but from a quick look at the documentation my understanding is that os.ModeDir is really just the single bit indicating it's a directory, so it explain why no other bits are set in my case and why directories end up created with the very restrictive mode 000.

What I don't understand is why this doesn't seem to be a problem for anyone else, including the developers who worked on the project using this library (they all use macOS FWIW).

KiaRaghavan commented 2 years ago

is there any update we could expect on this issue. To @thias point, I don't understand how this is not an issue to anyone who worked on this project.