Subject: | Seems to need read access to current directory |
Date: | Thu, 20 Aug 2015 11:08:11 +0800 |
To: | bug-Object-InsideOut [...] rt.cpan.org |
From: | se456 [...] rohan.id.au |
I've noticed that Object::InsideOut v3.98 fails when the current
directory is not readable by the user running the Perl binary. Most
Perl modules don't have this requirement, and so OIO creates a very
cryptic error message when you run it in such circumstances.
e.g.
This fails:
root@slushy:/# cd /root && setuidgid www-data perl -I/home/tdev/local/lib/perl5 -MObject::InsideOut
Can't locate OIO.pm: Permission denied at /usr/share/perl/5.20/base.pm line 97.
...propagated at /usr/share/perl/5.20/base.pm line 106.
BEGIN failed--compilation aborted at (eval 5) line 3.
BEGIN failed--compilation aborted at /home/tdev/local/lib/perl5/Object/InsideOut/Exception.pm line 64.
Compilation failed in require at /home/tdev/local/lib/perl5/Object/InsideOut.pm line 11.
BEGIN failed--compilation aborted at /home/tdev/local/lib/perl5/Object/InsideOut.pm line 11.
Compilation failed in require.
BEGIN failed--compilation aborted.
FYI setuidgid is a utility that comes with daemontools. Here's its man page:
SYNOPSIS
setuidgid account child
DESCRIPTION
account is a single argument. child consists of one or more arguments.
setuidgid sets its uid and gid to account's uid and gid, removing all supplementary groups. It then runs child.
setuidgid cannot be run by anyone other than root.
But this works:
root@slushy:~# cd / && setuidgid www-data perl -I/home/tdev/local/lib/perl5 -MObject::InsideOut
OIO::Code error: 'import' invoked from 'main'
Info: Can't use 'use Object::InsideOut;' or 'Object::InsideOut->import();' inside application code
Package: main
File: -
Line: 0
Trace begun at - line 0
main::BEGIN at - line 0
eval {...} at - line 0
BEGIN failed--compilation aborted.
(I realise that this second error message about "import invoked from main" is probably normal -- I'm not concerned about that.)
root@slushy:/# ls -ld /root
drwx------ 11 root root 4096 Aug 20 10:49 /root
root@slushy:/# ls -ld /
drwxr-xr-x 29 root root 4096 Apr 10 13:40 /
I think this is a bug and if possible, whatever's creating this requirement should be removed.
Thanks,
Rohan.
e.g.
This fails:
root@slushy:/# cd /root && setuidgid www-data perl -I/home/tdev/local/lib/perl5 -MObject::InsideOut
Can't locate OIO.pm: Permission denied at /usr/share/perl/5.20/base.pm line 97.
...propagated at /usr/share/perl/5.20/base.pm line 106.
BEGIN failed--compilation aborted at (eval 5) line 3.
BEGIN failed--compilation aborted at /home/tdev/local/lib/perl5/Object/InsideOut/Exception.pm line 64.
Compilation failed in require at /home/tdev/local/lib/perl5/Object/InsideOut.pm line 11.
BEGIN failed--compilation aborted at /home/tdev/local/lib/perl5/Object/InsideOut.pm line 11.
Compilation failed in require.
BEGIN failed--compilation aborted.
FYI setuidgid is a utility that comes with daemontools. Here's its man page:
SYNOPSIS
setuidgid account child
DESCRIPTION
account is a single argument. child consists of one or more arguments.
setuidgid sets its uid and gid to account's uid and gid, removing all supplementary groups. It then runs child.
setuidgid cannot be run by anyone other than root.
But this works:
root@slushy:~# cd / && setuidgid www-data perl -I/home/tdev/local/lib/perl5 -MObject::InsideOut
OIO::Code error: 'import' invoked from 'main'
Info: Can't use 'use Object::InsideOut;' or 'Object::InsideOut->import();' inside application code
Package: main
File: -
Line: 0
Trace begun at - line 0
main::BEGIN at - line 0
eval {...} at - line 0
BEGIN failed--compilation aborted.
(I realise that this second error message about "import invoked from main" is probably normal -- I'm not concerned about that.)
root@slushy:/# ls -ld /root
drwx------ 11 root root 4096 Aug 20 10:49 /root
root@slushy:/# ls -ld /
drwxr-xr-x 29 root root 4096 Apr 10 13:40 /
I think this is a bug and if possible, whatever's creating this requirement should be removed.
Thanks,
Rohan.