[Catalyst] FastCGI startup strangeness

Daniel J. Luke dluke at geeklair.net
Thu Sep 18 21:01:08 GMT 2014

I noticed today that an app I'm working on will start fine only if the user who is running the app can read the current directory (ie, if I'm starting it as a user dedicated to running the app, that user must have read permission on CWD).

Couldn't load class (MYAPP::Script::FastCGI) because: Can't locate MYAPP/Script/FastCGI.pm:   Permission denied at /path/to/perl-5.20.0/lib/site_perl/5.20.0/Catalyst/ScriptRunner.pm line 13.
	Catalyst::ScriptRunner::find_script_class("Catalyst::ScriptRunner", "MYAPP", "FastCGI") called at /path/to/perl/perl-5.20.0/lib/site_perl/5.20.0/Catalyst/ScriptRunner.pm line 42
	Catalyst::ScriptRunner::run("Catalyst::ScriptRunner", "MYAPP", "FastCGI") called at /path/to/MYAPP/script/MYAPP_fastcgi.pl line 4

strace shows the difference between a successful launch and a failed one is whether we get EACCESS or ENOENT when looking for ./MYAPP/Script/FastCGI.pm

stat("./MYAPP/Script/FastCGI.pmc", 0x7fffa8eba720) = -1 EACCES (Permission denied)
stat("./MYAPP/Script/FastCGI.pm", 0x7fffa8eba660) = -1 EACCES (Permission denied)

stat("./MYAPP/Script/FastCGI.pmc", 0x7fff80e76db0) = -1 ENOENT (No such file or directory)
stat("./MYAPP/Script/FastCGI.pm", 0x7fff80e76cf0) = -1 ENOENT (No such file or directory)

I didn't see this documented anywhere - am I missing some obvious reason why this behavior is desired?
Daniel J. Luke                                                                   
| *---------------- dluke at geeklair.net ----------------* |                          
| *-------------- http://www.geeklair.net -------------* |                          
|   Opinions expressed are mine and do not necessarily   |                          
|          reflect the opinions of my employer.          |                          

More information about the Catalyst mailing list