Skip to content

configurable umask for unix socket #85

Closed

Description

@pietern

The default umask (usually 022) can be overridden by the process starting Redis (e.g. to 000 to allow any user to connect to Redis over its Unix socket), but this also changes the permission mask for the log, snapshot and AOF. I think it would be good to add a configuration directive to explicitly set the mask for a unix socket, so a permissive unix socket doesn't necessarily impacts the permission settings on the other files Redis creates.

For example:

unixsocket /tmp/redis.sock
unixsocketperm 755 # As safe default, user can specify 777

This integer can be passed directly to chmod(2).

What do you think?

Activity

  1. antirez commented on Sep 20, 2011

    @antirez
    Contributor

    Makes sense to me, I agree that a specific option is the best pick. As a sole possible alternative I would simply set it to 777 by default if there are no concerns about that.

    If we go for the config directive, are you sure we don't need to convert it into an octal number before passing it to chmod? If I remember correctly you pass it as an octal value to chmod as well, like 0777, so if the user writes "777" in the config file we need to operate a conversion.

  2. mattsta commented on Jul 28, 2014

    @mattsta
    Contributor

    Added in 8523876 (October 2011)

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions