You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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.
Activity
antirez commentedon Sep 20, 2011
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.
Added a config directive for a Unix socket mask
Added a config directive for a Unix socket mask
mattsta commentedon Jul 28, 2014
Added in 8523876 (October 2011)
Added a config directive for a Unix socket mask
Clean up unowned slot keys when restarting (redis#85)