Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Test file is not readable, while running "make test"

0 views
Skip to first unread message

Shankar

unread,
Dec 30, 2009, 1:12:24 AM12/30/09
to begi...@perl.org
Hello,

(Firstly, Thanks to Matt Trout for pointing me to this forum. I re-
post my question below).

I'm using perl on AIX, and my version is v5.8.2.
(Also, I'm a regular user, with no write permissions to run "make
install", so installing everything on my local home directory).

My primary interest is in module Mail::Box. I downloaded this, and
realized that I needed to install several pre-requisites.
Subsequently, I tried installing pre-requisites such as,
TimeDate-1.20, Encode-2.39, and so on.
For each of these, as per instructions, I tried the following steps in
sequence:

1. perl Makefile.PL
2. make
3. make test
4. make install (This fails, I think, because I don't have any root or
super user permissions to make a site-wide install. Is that correct?

Steps 1 and 2 succeeded.
Step 3 in each of the modules that I attempted to install on my home
directory, gives an error that seems to say none of the *.t files are
readable.
Example error is below.
Am I doing something wrong?
Can someone please help?
Also, I should be able to use the modules locally from my home
directory's subdirectories, even though Step 4 fails. Is that right?

Thanks a lot.

Thanks, S

-----------------------------------------------------------
E.g. , for "Encode-2.39": (I copy and paste from my xterm command line
output)

PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e"
"test_har
ness(0, 'blib/lib', 'blib/arch')" t/*.t
t/Aliases..................t/Aliases.t is not readable
t/at-cn....................t/at-cn.t is not readable
t/at-tw....................t/at-tw.t is not readable
t/CJKT.....................t/CJKT.t is not readable
t/enc_data.................t/enc_data.t is not readable
t/enc_eucjp................t/enc_eucjp.t is not readable
t/enc_module...............t/enc_module.t is not readable
t/enc_utf8.................t/enc_utf8.t is not readable
t/Encode...................t/Encode.t is not readable
t/Encoder..................t/Encoder.t is not readable
t/encoding.................t/encoding.t is not readable
t/fallback.................t/fallback.t is not readable
t/from_to..................t/from_to.t is not readable
t/grow.....................t/grow.t is not readable
t/gsm0338..................t/gsm0338.t is not readable
t/guess....................t/guess.t is not readable
t/jis7-fallback............t/jis7-fallback.t is not readable
t/jperl....................t/jperl.t is not readable
t/mime-header..............t/mime-header.t is not readable
t/mime-name................t/mime-name.t is not readable
t/mime_header_iso2022jp....t/mime_header_iso2022jp.t is not readable
t/perlio...................t/perlio.t is not readable
t/piconv...................t/piconv.t is not readable
t/Unicode..................t/Unicode.t is not readable
t/utf8strict...............t/utf8strict.t is not readable
FAILED--25 test scripts could be run, alas--no output ever seen
make: 1254-004 The error code from the last command is 2

Shawn H Corey

unread,
Dec 30, 2009, 9:23:04 AM12/30/09
to Shankar, begi...@perl.org
Shankar wrote:
> 1. perl Makefile.PL
> 2. make
> 3. make test
> 4. make install (This fails, I think, because I don't have any root or
> super user permissions to make a site-wide install. Is that correct?
>
> Steps 1 and 2 succeeded.
> Step 3 in each of the modules that I attempted to install on my home
> directory, gives an error that seems to say none of the *.t files are
> readable.

Is the t/ directory executable?

UNIX has a quirk where a directory must be readable and executable to
gain access to its files. If a directory is readable but not
executable, you can read the names of the files but you can't access
their i-nodes. That means, you can't access their contents. You can
list the names with `ls` but trying to access their i-nodes fails, like
with `ls -l`.


--
Just my 0.00000002 million dollars worth,
Shawn

Programming is as much about organization and communication
as it is about coding.

I like Perl; it's the only language where you can bless your
thingy.

Shlomi Fish

unread,
Dec 30, 2009, 9:39:00 AM12/30/09
to begi...@perl.org, Shankar
On Wednesday 30 Dec 2009 08:12:24 Shankar wrote:
> Hello,
>

Hi Shankar.

> (Firstly, Thanks to Matt Trout for pointing me to this forum. I re-
> post my question below).
>
> I'm using perl on AIX, and my version is v5.8.2.

5.8.2 is incredibly old and broken. There are already perl-5.8.9 and
perl-5.10.1 . It's hard to know whether it will cause problems in your case.

> (Also, I'm a regular user, with no write permissions to run "make
> install", so installing everything on my local home directory).

You can still run "make install" with the appropriate PREFIX and/or DESTDIR
flags. Also see local-lib :

http://search.cpan.org/dist/local-lib/

>
> My primary interest is in module Mail::Box. I downloaded this, and
> realized that I needed to install several pre-requisites.
> Subsequently, I tried installing pre-requisites such as,
> TimeDate-1.20, Encode-2.39, and so on.
> For each of these, as per instructions, I tried the following steps in
> sequence:
>
> 1. perl Makefile.PL
> 2. make
> 3. make test
> 4. make install (This fails, I think, because I don't have any root or
> super user permissions to make a site-wide install. Is that correct?

You can use local-lib for that.

>
> Steps 1 and 2 succeeded.
> Step 3 in each of the modules that I attempted to install on my home
> directory, gives an error that seems to say none of the *.t files are
> readable.

OK, just to make sure, what happens when you try to view these file using a
pager such as "less" or "more"? What does "umask" return?

Regards,

Shlomi Fish

--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
Freecell Solver - http://fc-solve.berlios.de/

Bzr is slower than Subversion in combination with Sourceforge.
( By: http://dazjorz.com/ )

Shawn H Corey

unread,
Dec 30, 2009, 9:50:00 AM12/30/09
to dharmashankar subramanian, Perl Beginners
dharmashankar subramanian wrote:
> Hi Shawn,
> It appears to me that the directory has both read, as well as execute
> permissions (for me).
>
> See below, the output of 'ls -al' inside the directory.
>
>
>
> $ ls -al
> total 28
> drwxr-s--x 3 shankar shankar 2048 2005-02-14 11:24 .
> drwxr-s--x 8 shankar shankar 2048 2009-12-29 13:11 ..
> -rw-r----- 1 shankar shankar 8355 2001-08-09 03:46 Common.pm
> drwxr-s--x 2 shankar shankar 2048 2005-02-14 11:24 ExtUtils
> -rw-r----- 1 shankar shankar 1001 2001-08-09 04:00 IO_Lines.t
> -rw-r----- 1 shankar shankar 1122 2001-08-09 03:42 IO_Scalar.t
> -rw-r----- 1 shankar shankar 1031 2001-08-09 04:00 IO_ScalarArray.t
> -rw-r----- 1 shankar shankar 1026 1998-03-27 02:31 IO_WrapTie.t
> -rw-r----- 1 shankar shankar 1168 2001-08-07 03:15 simple.t
> -rw-r----- 1 shankar shankar 942 2001-08-07 02:02 two.t
>
>
> Any clue why?
>
> Thanks,
> Shankar

>
>
>
> On Wed, Dec 30, 2009 at 9:23 AM, Shawn H Corey <shawn...@gmail.com
> <mailto:shawn...@gmail.com>> wrote:
>
> Shankar wrote:
> > 1. perl Makefile.PL
> > 2. make
> > 3. make test
> > 4. make install (This fails, I think, because I don't have any root or
> > super user permissions to make a site-wide install. Is that correct?
> >
> > Steps 1 and 2 succeeded.
> > Step 3 in each of the modules that I attempted to install on my home
> > directory, gives an error that seems to say none of the *.t files are
> > readable.
>
> Is the t/ directory executable?
>
> UNIX has a quirk where a directory must be readable and executable to
> gain access to its files. If a directory is readable but not
> executable, you can read the names of the files but you can't access
> their i-nodes. That means, you can't access their contents. You can
> list the names with `ls` but trying to access their i-nodes fails, like
> with `ls -l`.

The above listing is not the same as the one in the OP. Can you get a
listing for one of the test files, say t/Aliases.t ?


BTW, use `Reply all` to reply to the sender and the list. :)

Dharmashankar Subramanian

unread,
Dec 30, 2009, 11:27:45 AM12/30/09
to Jeremiah Foster, begi...@perl.org
Thanks Jeremiah.

The /t folder is physically at the same level as where the tar ball was
uncompressed.
i.e. for example, in say, Encode-2.39. (see the last but one line of the
output below. The folder t is present).

$ ls -al
total 364
drwxr-s--x 16 shankar shankar 2048 2009-12-29 12:49 .
drwxr-s--x 20 shankar shankar 2048 2009-12-29 23:42 ..
-rw-r----- 1 shankar shankar 2583 2009-11-16 12:03 AUTHORS
drwxr-s--x 2 shankar shankar 2048 2009-12-29 12:41 Byte
drwxr-s--x 2 shankar shankar 2048 2009-12-29 12:42 CN
-rw-r----- 1 shankar shankar 79905 2009-11-26 04:24 Changes
drwxr-s--x 2 shankar shankar 2048 2009-12-29 12:42 EBCDIC
drwxr-s--x 2 shankar shankar 2048 2009-11-26 04:25 Encode
-rw-r--r-- 1 shankar shankar 0 2009-12-29 12:41 Encode.bs
-rw-r----- 1 shankar shankar 34287 2009-12-29 12:41 Encode.c
-rw-r----- 1 shankar shankar 13 2009-12-29 12:41 Encode.exp
-rw-r----- 1 shankar shankar 57333 2009-12-29 12:41 Encode.o
-rw-r----- 1 shankar shankar 29731 2009-11-26 04:24 Encode.pm
-rw-r----- 1 shankar shankar 22816 2009-11-26 04:24 Encode.xs
drwxr-s--x 2 shankar shankar 2048 2009-12-29 12:43 JP
drwxr-s--x 2 shankar shankar 2048 2009-12-29 12:44 KR
-rw-r----- 1 shankar shankar 7253 2009-07-08 08:05 MANIFEST
-rw-r----- 1 shankar shankar 467 2009-11-26 04:25 META.yml
-rw-r--r-- 1 shankar shankar 37327 2009-12-29 12:41 Makefile
-rw-r----- 1 shankar shankar 3407 2009-11-26 04:24 Makefile.PL
-rw-r----- 1 shankar shankar 1084 2006-05-03 13:30 README
drwxr-s--x 2 shankar shankar 2048 2009-12-29 12:44 Symbol
drwxr-s--x 2 shankar shankar 2048 2009-12-29 12:45 TW
drwxr-s--x 2 shankar shankar 2048 2009-12-29 12:45 Unicode
drwxr-s--x 2 shankar shankar 2048 2009-11-26 04:25 bin
drwxr-s--x 7 shankar shankar 2048 2009-12-29 12:45 blib
-rw-r----- 1 shankar shankar 4579 2009-12-29 12:41 def_t.c
-rw-r----- 1 shankar shankar 340 2009-12-29 12:41 def_t.exh
-rw-r----- 1 shankar shankar 55 2009-12-29 12:41 def_t.fnm
-rw-r----- 1 shankar shankar 296 2009-12-29 12:41 def_t.h
-rw-r----- 1 shankar shankar 2558 2009-12-29 12:41 def_t.o
-rw-r----- 1 shankar shankar 4392 2006-05-03 13:30 encengine.c
-rw-r----- 1 shankar shankar 1995 2009-12-29 12:41 encengine.o
-rw-r----- 1 shankar shankar 19892 2009-11-26 04:24 encoding.pm
drwxr-s--x 3 shankar shankar 2048 2009-11-26 04:25 lib
-rw-r----- 1 shankar shankar 788 2009-12-29 12:49 maketestout.txt
-rw-r----- 1 shankar shankar 0 2009-12-29 12:41 pm_to_blib
drwxr-s--x 2 shankar shankar 2048 2009-11-26 04:25 t
drwxr-s--x 2 shankar shankar 4096 2009-11-26 04:25 ucm


On Wed, Dec 30, 2009 at 10:25 AM, Jeremiah Foster <
jere...@jeremiahfoster.com> wrote:

>
> On Dec 30, 2009, at 7:12, Shankar wrote:
> > Hello,


> >
> > I'm using perl on AIX, and my version is v5.8.2.
>

> I know it is no help to say you should upgrade your perl or your OS, but
> sometimes that makes a huge difference in your day to day perl programming.
> :)


>
> > (Also, I'm a regular user, with no write permissions to run "make
> > install", so installing everything on my local home directory).
>

> There is a perl module that helps with that, called local::lib. It allows
> you to install things in a directory that you have read/write access to. It
> is very useful and I can recommend it.
> http://cpan.uwinnipeg.ca/dist/local-lib


>
> > My primary interest is in module Mail::Box. I downloaded this, and
> > realized that I needed to install several pre-requisites.
> > Subsequently, I tried installing pre-requisites such as,
> > TimeDate-1.20, Encode-2.39, and so on.
> > For each of these, as per instructions, I tried the following steps in
> > sequence:
> >
> > 1. perl Makefile.PL
> > 2. make
> > 3. make test
> > 4. make install (This fails, I think, because I don't have any root or
> > super user permissions to make a site-wide install. Is that correct?
>

> This would be my guess as well, though I can't be certain. You may want to
> use the cpan perl tool to do your installing of modules, it does this Make
> incantation for you and you can add parameters like sudo so you can install
> stuff system wide if you need that.


> >
> > Steps 1 and 2 succeeded.
> > Step 3 in each of the modules that I attempted to install on my home
> > directory, gives an error that seems to say none of the *.t files are
> > readable.
>

> Where is the the testing directory? I mean where is it physically located
> on your file system? When I download Time::Date 1.20 and cd into the dir,
> make test runs fine. The test files, i.e. everything under t/ is owned by
> me, so I cannot reproduce your error.


>
> > Example error is below.
> > Am I doing something wrong?
>

> I don't think so.
>
> > Can someone please help?
>
> Can you post more information?


>
> > Also, I should be able to use the modules locally from my home
> > directory's subdirectories, even though Step 4 fails. Is that right?
>

> If the tests don't pass, you may not be able to access the code in the
> modules without explicitly defining the path to the code. So it will be a
> little tricky.
>
> Jeremiah

Shankar

unread,
Dec 30, 2009, 10:12:34 AM12/30/09
to begi...@perl.org
On Dec 30, 9:50 am, shawnhco...@gmail.com (Shawn H Corey) wrote:
> dharmashankar subramanian wrote:
> > Hi Shawn,
> > It appears to me that the directory has both read, as well as execute
> > permissions (for me).
>
> > See below, the output of 'ls -al' inside the directory.
>
> > $ ls -al
> > total 28
> > drwxr-s--x  3 shankar shankar 2048 2005-02-14 11:24 .
> > drwxr-s--x  8 shankar shankar 2048 2009-12-29 13:11 ..
> > -rw-r-----  1 shankar shankar 8355 2001-08-09 03:46 Common.pm
> > drwxr-s--x  2 shankar shankar 2048 2005-02-14 11:24 ExtUtils
> > -rw-r-----  1 shankar shankar 1001 2001-08-09 04:00 IO_Lines.t
> > -rw-r-----  1 shankar shankar 1122 2001-08-09 03:42 IO_Scalar.t
> > -rw-r-----  1 shankar shankar 1031 2001-08-09 04:00 IO_ScalarArray.t
> > -rw-r-----  1 shankar shankar 1026 1998-03-27 02:31 IO_WrapTie.t
> > -rw-r-----  1 shankar shankar 1168 2001-08-07 03:15 simple.t
> > -rw-r-----  1 shankar shankar  942 2001-08-07 02:02 two.t
>
> > Any clue why?
>
> > Thanks,
> > Shankar
>

Hi,
Sorry about that Shawn.
I should have hit Reply All.

Here goes the listing for this specific example from the OP.
(The one I sent you was a similar listing for another manually
installed module).
The permissions show as 640 for all the *.t files that the test script
reports as "not readable".

Also, as per reply to Shlomi, I ran umask in the directory, and it
returned 22.
'more' also works as expected, and displays contents of the file.


$ ls -al
total 464
drwxr-s--x 2 shankar shankar 2048 2009-11-26 04:25 .
drwxr-s--x 16 shankar shankar 2048 2009-12-29 12:49 ..
-rw-r----- 1 shankar shankar 5316 2009-09-07 10:57 Aliases.t
-rw-r----- 1 shankar shankar 3087 2009-11-16 11:44 CJKT.t
-rw-r----- 1 shankar shankar 4702 2009-09-07 10:57 Encode.t
-rw-r----- 1 shankar shankar 1004 2009-11-26 04:24 Encoder.t
-rw-r----- 1 shankar shankar 416 2009-11-26 04:24 Mod_EUCJP.pm
-rw-r----- 1 shankar shankar 4762 2009-11-26 04:24 Unicode.t
-rw-r----- 1 shankar shankar 4086 2009-09-07 10:57 at-cn.t
-rw-r----- 1 shankar shankar 2606 2009-09-07 10:57 at-tw.t
-rw-r----- 1 shankar shankar 32104 2009-09-07 10:57 big5-eten.enc
-rw-r----- 1 shankar shankar 45868 2009-09-07 10:57 big5-eten.utf
-rw-r----- 1 shankar shankar 42530 2009-09-07 10:57 big5-hkscs.enc
-rw-r----- 1 shankar shankar 60690 2009-09-07 10:57 big5-hkscs.utf
-rw-r----- 1 shankar shankar 994 2009-11-26 04:24 enc_data.t
-rw-r----- 1 shankar shankar 2101 2009-11-26 04:24 enc_eucjp.t
-rw-r----- 1 shankar shankar 24 2009-09-07 10:57 enc_module.enc
-rw-r----- 1 shankar shankar 1746 2009-11-26 04:24 enc_module.t
-rw-r----- 1 shankar shankar 1919 2009-11-26 04:24 enc_utf8.t
-rw-r----- 1 shankar shankar 5235 2009-09-07 10:57 encoding.t
-rw-r----- 1 shankar shankar 5197 2009-11-26 03:52 fallback.t
-rw-r----- 1 shankar shankar 357 2009-11-26 04:24 from_to.t
-rw-r----- 1 shankar shankar 17367 2009-09-07 10:57 gb2312.enc
-rw-r----- 1 shankar shankar 24663 2009-09-07 10:57 gb2312.utf
-rw-r----- 1 shankar shankar 820 2009-09-07 10:57 grow.t
-rw-r----- 1 shankar shankar 3461 2009-09-07 10:57 gsm0338.t
-rw-r----- 1 shankar shankar 3461 2009-11-16 11:44 guess.t
-rw-r----- 1 shankar shankar 337 2009-09-07 10:57 jis7-fallback.t
-rw-r----- 1 shankar shankar 145 2009-09-07 10:57 jisx0201.enc
-rw-r----- 1 shankar shankar 208 2009-09-07 10:57 jisx0201.utf
-rw-r----- 1 shankar shankar 16145 2009-09-07 10:57 jisx0208.enc
-rw-r----- 1 shankar shankar 22899 2009-09-07 10:57 jisx0208.utf
-rw-r----- 1 shankar shankar 20332 2009-09-07 10:57 jisx0212.enc
-rw-r----- 1 shankar shankar 20069 2009-09-07 10:57 jisx0212.utf
-rw-r----- 1 shankar shankar 2670 2009-11-26 04:24 jperl.t
-rw-r----- 1 shankar shankar 19173 2009-09-07 10:57 ksc5601.enc
-rw-r----- 1 shankar shankar 27228 2009-09-07 10:57 ksc5601.utf
-rw-r----- 1 shankar shankar 4585 2009-11-26 04:24 mime-header.t
-rw-r----- 1 shankar shankar 836 2009-11-26 04:24 mime-name.t
-rw-r----- 1 shankar shankar 1043 2009-09-07 10:57
mime_header_iso2022jp.t
-rw-r----- 1 shankar shankar 4944 2009-11-16 11:44 perlio.t
-rw-r----- 1 shankar shankar 2623 2009-11-26 04:24 piconv.t
-rw-r----- 1 shankar shankar 1733 2009-11-26 04:24 rt.pl
-rw-r----- 1 shankar shankar 1858 2009-09-07 10:57 unibench.pl
-rw-r----- 1 shankar shankar 2530 2009-09-07 10:57 utf8strict.t


Shankar

unread,
Dec 30, 2009, 10:05:51 AM12/30/09
to begi...@perl.org

more shows the contents on the screen.
umask inside the directory "t" (where all the *.t files reside)
returns 22.

Thanks a lot for the replies.
I'll check to see if I may update perl.

If I'm unable, is it okay to do the following:
1. Run the first two steps of the installation process (perl
Makefile.PL and make) for each module I manually uncompress the
tarball and install. This populates the blib/lib directory for each
module.
2. Simply manually put all the various contents of each of the above
populated blib/lib directories (one for each module I install) into a
common "lib" directory that I'll create on my home directory.
3. Give the above commnon "lib" directory higher precedence than the
default perl paths.

Will the above effectively accomplish what is needed to use these
modules from my home directory?

Thanks,
Shankar

> Freecell Solver -http://fc-solve.berlios.de/

Dharmashankar Subramanian

unread,
Dec 31, 2009, 12:57:06 PM12/31/09
to Jeremiah Foster, begi...@perl.org
Thanks Jeremiah.

I downloaded local-lib-1.004009, from CPAN.
(I had already installed the latest CPAN module myself into a local
directory that I gave higher precedence than the default Perl search paths.
This is CPAN-1.9402. Also, my local install directory is:
/u/shankar/my_test/perltools/MyLibs/lib/perl5/).

Upon executing: perl Makefile.PL in the local-lib-1.004009 directory, I got
the following error:

Undefined subroutine &CPAN::HandleConfig::output called at
/u/shankar/my_test/perltools/MyLibs/lib/perl5/CPAN/HandleConfig.pm line 564.

As a result, no Makefile was produced, so I c'd not 'build' and locally
install local::lib.

Any reason why I might be getting such an error?

Shankar


On Thu, Dec 31, 2009 at 10:40 AM, Jeremiah Foster <
jere...@jeremiahfoster.com> wrote:

>
> On Dec 30, 2009, at 16:05, Shankar wrote:
>
> > On Dec 30, 9:39 am, shlo...@iglu.org.il (Shlomi Fish) wrote:
> >> On Wednesday 30 Dec 2009 08:12:24 Shankar wrote:
> >
> > Thanks a lot for the replies.
> > I'll check to see if I may update perl.
> >
> > If I'm unable, is it okay to do the following:
> > 1. Run the first two steps of the installation process (perl
> > Makefile.PL and make) for each module I manually uncompress the
> > tarball and install. This populates the blib/lib directory for each
> > module.
> > 2. Simply manually put all the various contents of each of the above
> > populated blib/lib directories (one for each module I install) into a
> > common "lib" directory that I'll create on my home directory.
> > 3. Give the above commnon "lib" directory higher precedence than the
> > default perl paths.
> >
> > Will the above effectively accomplish what is needed to use these
> > modules from my home directory?
>

> Yes it should - but this is not a sustainable practice, you won't be able
> to install dozens of modules this way.
>
> I strongly recommend looking into local::lib which will help you automate
> this process. It is designed for the installation of modules when you don't
> have admin rights. http://cpan.uwinnipeg.ca/dist/local-lib
>
> Jeremiah

Hack, Gabi (ext)

unread,
Jan 4, 2010, 9:33:56 AM1/4/10
to Shankar, begi...@perl.org
> > dharmashankar subramanian wrote:
> > > Hi Shawn,
> > > It appears to me that the directory has both read, as
> well as execute
> > > permissions (for me).
> >
> > > See below, the output of 'ls -al' inside the directory.
> >
> > > $ ls -al
> > > total 28
> > > drwxr-s--x  3 shankar shankar 2048 2005-02-14 11:24 .
> > > drwxr-s--x  8 shankar shankar 2048 2009-12-29 13:11 ..
> > > -rw-r-----  1 shankar shankar 8355 2001-08-09 03:46 Common.pm
> > > drwxr-s--x  2 shankar shankar 2048 2005-02-14 11:24 ExtUtils
> > > -rw-r-----  1 shankar shankar 1001 2001-08-09 04:00 IO_Lines.t
> > > -rw-r-----  1 shankar shankar 1122 2001-08-09 03:42 IO_Scalar.t
> > > -rw-r-----  1 shankar shankar 1031 2001-08-09 04:00
> IO_ScalarArray.t
> > > -rw-r-----  1 shankar shankar 1026 1998-03-27 02:31 IO_WrapTie.t
> > > -rw-r-----  1 shankar shankar 1168 2001-08-07 03:15 simple.t
> > > -rw-r-----  1 shankar shankar  942 2001-08-07 02:02 two.t
> >

>


Hi Shankar,

it look's like your home directory has the SGID bit set. I would have a look in this direction. Might be, this causes your problems (see below a short description in case you aren't familiar with the special permission bits).

I don't know AIX, but if there're tools like strace and ltrace you could have a closer look why the reading of the test files fails

cheers, gabi


--------------------snip----------------------------------
*SUID or setuid: change user ID on execution. If setuid bit is set, when the file will be executed by a user, the process will have the same rights as the owner of the file being executed.

*SGID or setgid: change group ID on execution. Same as above, but inherits rights of the group of the owner of the file on execution. For directories it also may mean that when a new file is created in the directory it will inherit the group of the directory (and not of the user who created the file).

By default, when a user executes a file, the process which results in this execution has the same permissions as those of the user. In fact, the process inherits his default group and user identification.

If you set the SUID attribute on an executable file, the process resulting in its execution doesn't use the user's identification but the user identification of the file owner.

For instance, consider the script myscript.sh which tries to write things into mylog.log :

# ls -l
-rwxrwxrwx 10 george administrators 4096 2006-03-10 12:50 myscript.sh
-rwxrwx--- 10 george administrators 4096 2006-03-10 12:50 mylog.log

As you can see in this example, George gave full permissions to everybody on myscript.sh but he forgot to do so on mylog.log. When Robert executes myscript.sh, the process runs using Robert's user identification and Robert's default group (robert:senioradmin). As a consequence, myscript fails and reports that it can't write in mylog.log.

In order to fix this problem George could simply give full permissions to everybody on mylog.log. But this would make it possible for anybody to write in mylog.log, and George only wants this file to be updated by his myscript.sh program. For this he sets the SUID bit on myscript.sh:

# chmod u+s myscript.sh

As a consequence, when a user executes the script the resulting process uses George's user identification rather than the user's. If set on an executable file, the SUID makes the process inherit the owner's user identification rather than the one of the user who executed it. This fixes the problem, and even though nobody but George can write directly in mylog.log, anybody can execute myscript.sh which updates the file content.

Similarly, it is possible to set the SGID attribute on an executable file. This makes the process use the owner's default group instead of the user's one. This is done by:

# chmod g+s myscript.sh

By setting SUID and SGID attributes the owner makes it possible for other users to execute the file as if they were him or members of his default group.
-----------------------snap--------------------------------

Jeremiah Foster

unread,
Dec 30, 2009, 10:25:41 AM12/30/09
to Shankar, begi...@perl.org

On Dec 30, 2009, at 7:12, Shankar wrote:
> Hello,
>
> I'm using perl on AIX, and my version is v5.8.2.

I know it is no help to say you should upgrade your perl or your OS, but sometimes that makes a huge difference in your day to day perl programming. :)

> (Also, I'm a regular user, with no write permissions to run "make


> install", so installing everything on my local home directory).

There is a perl module that helps with that, called local::lib. It allows you to install things in a directory that you have read/write access to. It is very useful and I can recommend it. http://cpan.uwinnipeg.ca/dist/local-lib

> My primary interest is in module Mail::Box. I downloaded this, and


> realized that I needed to install several pre-requisites.
> Subsequently, I tried installing pre-requisites such as,
> TimeDate-1.20, Encode-2.39, and so on.
> For each of these, as per instructions, I tried the following steps in
> sequence:
>
> 1. perl Makefile.PL
> 2. make
> 3. make test
> 4. make install (This fails, I think, because I don't have any root or
> super user permissions to make a site-wide install. Is that correct?

This would be my guess as well, though I can't be certain. You may want to use the cpan perl tool to do your installing of modules, it does this Make incantation for you and you can add parameters like sudo so you can install stuff system wide if you need that.
>

> Steps 1 and 2 succeeded.
> Step 3 in each of the modules that I attempted to install on my home
> directory, gives an error that seems to say none of the *.t files are
> readable.

Where is the the testing directory? I mean where is it physically located on your file system? When I download Time::Date 1.20 and cd into the dir, make test runs fine. The test files, i.e. everything under t/ is owned by me, so I cannot reproduce your error.

> Example error is below.


> Am I doing something wrong?

I don't think so.

> Can someone please help?

Can you post more information?

> Also, I should be able to use the modules locally from my home


> directory's subdirectories, even though Step 4 fails. Is that right?

If the tests don't pass, you may not be able to access the code in the modules without explicitly defining the path to the code. So it will be a little tricky.

Jeremiah

0 new messages