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
failure:
stat("./MYAPP/Script/FastCGI.pmc", 0x7fffa8eba720) = -1 EACCES (Permission
denied)
stat("./MYAPP/Script/FastCGI.pm", 0x7fffa8eba660) = -1 EACCES (Permission
denied)
success:
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
+========================================================+
| *---------------- [email protected] ----------------* |
| *-------------- http://www.geeklair.net -------------* |
+========================================================+
| Opinions expressed are mine and do not necessarily |
| reflect the opinions of my employer. |
+========================================================+
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/