Skip to content

Directories get created with mode 000 #20

@thias

Description

@thias

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).

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