Subject: | cpan is stymied by incorrect directory and file permissions |
I'm attempting to install Math::Subsets::List using cpan v. 1.98 and it
is failing to finish the unpacking operation because the directories in
the distribution do not have the execute bit set and none of the files
or directories have the write bit set.
The author has indicated that the distribution was built on Windows,
which is the source of the uncommon permissions. The distribution has
been around since 2009; I haven't been able to test if older versions of
cpan handled this correctly.
I should note that CPAN Testers do not seem to have problems with its
installation. I can't explain that. I've tried this on two separate
systems with the same results. Running cpanm yields a similar failure.
The message I'm getting from cpan is
Running make for P/PR/PRBRENAN/Math-Subsets-List-1.004.tar.gz CPAN:
Digest::SHA loaded ok (v5.71) CPAN: Compress::Zlib loaded ok (v2.048)
Checksum for
/home/dj/.cpan/sources/authors/id/P/PR/PRBRENAN/Math-Subsets-List-1.004.tar.gz
ok CPAN: File::Temp loaded ok (v0.22) Couldn't move
/home/dj/.cpan/build/tmp-8209/Math-Subsets-List-1.004/MANIFEST to
/home/dj/.cpan/build/Math-Subsets-List-1.004-38LG6w/MANIFEST: Permission
denied at
/home/dj/perl5/perlbrew/perls/perl-5.16.0/lib/5.16.0/CPAN/Distribution.pm line
524.
I've confirmed that the directory permissions are the problem by
repackaging the tarball after running
find Math-Subsets-List-1.004 -type d -exec chmod +x \{} \;
chmod -R +w Math-Subsets-List-1.004/
using cpaninject to insert it into my CPAN sources directory, and
rerunning cpan.
Would it be possible for cpan to correct permissions before it attempts
to move things? If this is a common problem for Windows created
tarballs, then it makes sense for the cpan machinery to handle it.
Thanks,
Diab