Installation

perl package directory permission problems: sudo cpanm --notest Mojolicious::Plugin::SetUserGroup

perl package directory permission problems: sudo cpanm --notest Mojolicious::Plugin::SetUserGroup

by Andras Balogh -
Number of replies: 3

I am trying to install v2.19 under ubuntu. Everything is fine, check_modules.pl checks out, and then after

sudo cpanm --notest Mojolicious::Plugin::SetUserGroup

Suddenly things break down.

It looks like the following directories become not readable/executable by general users: 
/usr/local/share/perl/5.38.2/Mojolicious
/usr/local/share/perl/5.38.2/Module

What fixes this is to do
sudo chmod og+rx /usr/local/share/perl/5.38.2/Mojolicious
sudo chmod og+rx /usr/local/share/perl/5.38.2/Mojolicious/Plugin
sudo chmod og+rx /usr/local/share/perl/5.38.2/Module
sudo chmod og+rx /usr/local/share/perl/5.38.2/Module/Build




In reply to Andras Balogh

Re: perl package directory permission problems: sudo cpanm --notest Mojolicious::Plugin::SetUserGroup

by Glenn Rice -

That should not be the case.  Usually cpanm installs the files as readable for everyone.  So something on your system has made it so that those directories have the wrong permissions.  It is probably a directory above with the special bit set that insists that anything added inside get the same permissions.

I recommend that you instead run

sudo chmod -R og+rX /usr/local/share/perl

That will make all files in the /usr/local/share/perl directory readable recursively, and will make all directories executable.  You shouldn't use +x because that will also make files executable, and they should not be.

In reply to Glenn Rice

Re: perl package directory permission problems: sudo cpanm --notest Mojolicious::Plugin::SetUserGroup

by Andras Balogh -
Yes, you are right. Any new directory created were not readable/executable by default permissions.
In reply to Andras Balogh

Re: perl package directory permission problems: sudo cpanm --notest Mojolicious::Plugin::SetUserGroup

by Danny Glin -

I have the same issue on my system.  Any time I install a perl package from CPAN it is not readable by all users.  I assume that it's because of the default umask on my server, which was probably set by our IT folks.

I've just got in the habit of changing the permissions every time I install a package.