Skip Menu |

This queue is for tickets about the Catalyst-Plugin-Session-Store-FastMmap CPAN distribution.

Report information
The Basics
Id: 26830
Status: resolved
Priority: 0/
Queue: Catalyst-Plugin-Session-Store-FastMmap

People
Owner: Nobody in particular
Requestors: LGODDARD [...] cpan.org
Cc:
AdminCc:

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



Subject: File Permissions creating session_data
My server logs are showing that Catalyst had no permission to write to /tmp/MyApp/session_data. I had no idea it would want to, but tracked it down to this module, and the below routine: it seems Catalyst::Utils::class2tempdir creates /tmp/MyApp as root. I guess I should report to whomever owns Catalyst::Utils...? 83 sub setup_session { 84 my $c = shift; 85 86 $c->NEXT::setup_session(@_); 87 88 my $tmpdir = Catalyst::Utils::class2tempdir($c) 89 || Catalyst::Exception->throw("Can't determine tempdir for $c"); 90 91 my $file = $c->config->{session}{storage} ||= 92 File::Spec->catfile( # Cache::FastMmap doesn't like Path::Class objects 93 $tmpdir, 94 "session_data", 95 );
From: DMAKI [...] cpan.org
I think the real problem is that, although Store::FastMmap does correctly use the storage path specified in MyApp->config( session => { storage => '/path/to/session_data' } ); It still attempts to create the temp directory, when it doesn't need to: Path::Class::dir($tmpdir)->mkpath; ^^^^^^^ This probably should be something like: my $dir = Path::Class::file($file)->parent; if (! -d $dir) { $dir->mkpath; }
This is fixed in trunk now. Thanks =)