Skip Menu |

This queue is for tickets about the Cache-Cache CPAN distribution.

Report information
The Basics
Id: 74345
Status: rejected
Priority: 0/
Queue: Cache-Cache

People
Owner: Nobody in particular
Requestors: cvaill [...] yahoo.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Cache::FileCache incorrect permissions under umask 077
Date: Tue, 24 Jan 2012 14:41:26 -0800 (PST)
To: "bug-Cache-Cache [...] rt.cpan.org" <bug-Cache-Cache [...] rt.cpan.org>
From: Christopher Vaill <cvaill [...] yahoo.com>
When the umask is set to 077 (or anything with an execute bit set), the modes on files created by Cache::FileCache don't come out quite right:   $ umask 0077 $ perl -MCache::FileCache -e '$c = Cache::FileCache->new(); $c->set("key", "value");' $ find /tmp/FileCache -type f | xargs ls -l -r-xrw-rwx 1 vaillc wheel 145 Jan 24 17:13 /tmp/FileCache/Default/a/6/2/a62f2225bf70bfaccbc7f1ef2a397836717377de $ The file has a mode of 0567, but should have a mode of 0600.  The cause is this, at line 587 of Cache::FileBackend:     $p_optional_mode ||= 0666 - umask( ); the expression should be 0666 & ~umask().
Cache::Cache is no longer being maintained. It has been replaced with CHI (https://metacpan.org/module/CHI). On Tue Jan 24 17:41:34 2012, cvaill@yahoo.com wrote: Show quoted text
> When the umask is set to 077 (or anything with an execute bit set), > the modes on files created by Cache::FileCache don't come out quite > right: >   > $ umask > 0077 > $ perl -MCache::FileCache -e '$c = Cache::FileCache->new(); $c-
> >set("key", "value");'
> $ find /tmp/FileCache -type f | xargs ls -l > -r-xrw-rwx 1 vaillc wheel 145 Jan 24 17:13 > /tmp/FileCache/Default/a/6/2/a62f2225bf70bfaccbc7f1ef2a397836717377de > $ > > > The file has a mode of 0567, but should have a mode of 0600.  The > cause is this, at line 587 of Cache::FileBackend: >   >   $p_optional_mode ||= 0666 - umask( ); > > the expression should be 0666 & ~umask(). >