Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG perl 5.10.0] Permission denied when building as non-root user on FreeBSD 6.2+ #9454

Closed
p5pRT opened this issue Aug 20, 2008 · 10 comments
Closed

Comments

@p5pRT
Copy link

p5pRT commented Aug 20, 2008

Migrated from rt.perl.org#58180 (status was 'resolved')

Searchable as RT58180$

@p5pRT
Copy link
Author

p5pRT commented Aug 20, 2008

From italpro@qs1213.pair.com

Created by italpro@qs1213.pair.com

When building Perl 5.10.0 under FreeBSD 6.2 (and I think more recent
versions) as well as a non-root (unprivilged user).

This happens because recent FreeBSD releases make /usr/home unreadable
by regular users, and for some reasons perl installation fails if it
cannon opendir() that directory - and it probably shouldn't fail.
I asked the superuser to make that directory readable to me and perl
built and installed regularly.

==> HOW TO REPRODUCE

- Login as unprivileged user
- Unpack the perl 5.10 distribution
# sh Configure -de -Dprefix=/your/local/directory
# make

==> ERROR (reporting the last part of "make" output)

cd lib/unicore && ../../miniperl -I../../lib mktables -w
touch uni.data
`sh cflags "optimize='-O'" perlmain.o` perlmain.c
  CCCMD = cc -DPERL_CORE -c -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -I/usr/local/include -std=c89 -O
+-Wall -ansi -W -Wextra -Wdeclaration-after-statement -Wendif-labels

  Making DynaLoader (static)
Makefile out-of-date with respect to ../../lib/Config.pm ../../config.h
Cleaning current config before rebuilding Makefile...
make -f Makefile.old clean > /dev/null 2>&1
../../miniperl "-I../../lib" "-I../../lib" Makefile.PL "INSTALLDIRS=perl" "INSTALLMAN3DIR=none" "PERL_CORE=1" "LIBPERL_A=libperl.a"
opendir(./../../../../..)​: Permission denied at ../../lib/File/Spec/Unix.pm line 478
opendir(./../../../../..)​: Permission denied at ../../lib/File/Spec/Unix.pm line 478
Writing Makefile for DynaLoader
==> Your Makefile has been rebuilt. <==
==> Please rerun the make command. <==
false
*** Error code 1

Stop in /usr/home/italpro/soft/perl-5.10.0/ext/DynaLoader.
make config failed, continuing anyway...
/miniperl​: not found
*** Error code 127

Stop in /usr/home/italpro/soft/perl-5.10.0/ext/DynaLoader.
*** Error code 1

Perl Info

Flags:
    category=install
    severity=medium

Site configuration information for perl 5.10.0:

Configured by italpro at Wed Aug 20 16:57:09 EDT 2008.

Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
  Platform:
    osname=freebsd, osvers=6.2-release-p1, archname=i386-freebsd
    uname='freebsd qs1213.pair.com 6.2-release-p1 freebsd 6.2-release-p1 #1: mon may 7 14:30:09 edt 2007 mlehner@mayon.pair.com:usrobjusrsrcsys6pairc-smp i386 '
    config_args='-de -Dprefix=/usr/home/italpro/localperl -Dinstallscript=/usr/home/italpro/localperl/scripts'
    hint=previous, useposix=true, d_sigaction=define
    useithreads=undef, usemultiplicity=undef
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=undef, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -I/usr/local/include',
    optimize='-O',
    cppflags='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -I/usr/local/include -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -I/usr/local/include'
    ccversion='', gccversion='3.4.6 [FreeBSD] 20060305', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='cc', ldflags ='-Wl,-E  -L/usr/local/lib'
    libpth=/usr/lib /usr/local/lib
    libs=-lgdbm -lm -lcrypt -lutil -lc
    perllibs=-lm -lcrypt -lutil -lc
    libc=, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags='-DPIC -fPIC', lddlflags='-shared  -L/usr/local/lib'

Locally applied patches:
    


@INC for perl 5.10.0:
    /usr/home/italpro/localperl/lib/5.10.0/i386-freebsd
    /usr/home/italpro/localperl/lib/5.10.0
    /usr/home/italpro/localperl/lib/site_perl/5.10.0/i386-freebsd
    /usr/home/italpro/localperl/lib/site_perl/5.10.0
    .


Environment for perl 5.10.0:
    HOME=/usr/home/italpro
    LANG (unset)
    LANGUAGE (unset)
    LC_ALL=en_US.UTF-8
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home/italpro/bin:/home/italpro/localperl/bin:/home/italpro/localperl/scripts:/home/italpro/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/usr/home/italpro/bin
    PERL_BADLANG (unset)
    SHELL=/usr/local/bin/bash

@p5pRT
Copy link
Author

p5pRT commented Oct 2, 2008

From tsibley@cpan.org

I can confirm that this happens for me with both 5.10.0 and 5.8.8 on
Linux (2.4.32) where /home is unreadable (but executable) by my user.

@p5pRT
Copy link
Author

p5pRT commented Oct 2, 2008

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Nov 7, 2008

From @smpeters

On Wed Aug 20 14​:15​:07 2008, italpro@​qs1213.pair.com wrote​:

This is a bug report for perl from italpro@​qs1213.pair.com,
generated with the help of perlbug 1.36 running under perl 5.10.0.

-----------------------------------------------------------------
[Please enter your report here]

When building Perl 5.10.0 under FreeBSD 6.2 (and I think more recent
versions) as well as a non-root (unprivilged user).

This happens because recent FreeBSD releases make /usr/home unreadable
by regular users, and for some reasons perl installation fails if it
cannon opendir() that directory - and it probably shouldn't fail.
I asked the superuser to make that directory readable to me and perl
built and installed regularly.

==> HOW TO REPRODUCE

- Login as unprivileged user
- Unpack the perl 5.10 distribution
# sh Configure -de -Dprefix=/your/local/directory
# make

==> ERROR (reporting the last part of "make" output)

cd lib/unicore && ../../miniperl -I../../lib mktables -w
touch uni.data
`sh cflags "optimize='-O'" perlmain.o` perlmain.c
CCCMD = cc -DPERL_CORE -c -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H
-fno-strict-aliasing -pipe -I/usr/local/include -std=c89 -O
+-Wall -ansi -W -Wextra -Wdeclaration-after-statement -Wendif-labels

Making DynaLoader \(static\)

Makefile out-of-date with respect to ../../lib/Config.pm
../../config.h
Cleaning current config before rebuilding Makefile...
make -f Makefile.old clean > /dev/null 2>&1
../../miniperl "-I../../lib" "-I../../lib" Makefile.PL
"INSTALLDIRS=perl" "INSTALLMAN3DIR=none" "PERL_CORE=1"
"LIBPERL_A=libperl.a"
opendir(./../../../../..)​: Permission denied at
../../lib/File/Spec/Unix.pm line 478
opendir(./../../../../..)​: Permission denied at
../../lib/File/Spec/Unix.pm line 478
Writing Makefile for DynaLoader
==> Your Makefile has been rebuilt. <==
==> Please rerun the make command. <==
false
*** Error code 1

Stop in /usr/home/italpro/soft/perl-5.10.0/ext/DynaLoader.
make config failed, continuing anyway...
/miniperl​: not found
*** Error code 127

Stop in /usr/home/italpro/soft/perl-5.10.0/ext/DynaLoader.
*** Error code 1

What are your exact permissions on /usr/home? I want to investigate this problem, but I'd
like to work with the exact permissions you have.

Thanks,

Steve Peters

@p5pRT
Copy link
Author

p5pRT commented Nov 7, 2008

From arthas@nordest.pm.org

Hello Steve!

This was on the FreeBSD box of my ISP. I am a non-root user and I
couldn't even
read /usr/home (I could only read my home directory at
/usr/home/italpro). This
seems to be common on FreeBSD 6.x, where normal user can't see /usr/home
contents in order not to see the list of the other user directories.

I then asked and obtained read access to that directory from my ISP, and
perl
built fine. I however feel that perl should build locally even if
/usr/home is
not accessible.

Thanks in advance for investigating.

Michele.

@p5pRT
Copy link
Author

p5pRT commented Nov 8, 2008

From @LordArthas

Hi Steve!

What are your exact permissions on /usr/home? I want to investigate this problem, but I'd
like to work with the exact permissions you have.

This was on the FreeBSD box of my ISP. I am a non-root user and I couldn't even
read /usr/home (I could only read my home directory at /usr/home/italpro). This
seems to be common on FreeBSD 6.x, where normal user can't see /usr/home
contents in order not to see the list of the other user directories.

I then asked and obtained read access to that directory from my ISP, and perl
built fine. I however feel that perl should build locally even if /usr/home is
not accessible.

Thanks in advance for investigating.

Talk to you soon,
Michele.

--
Michele Beltrame
http​://www.italpro.net/
ICQ 76660101 - SkyPe arthas77

@p5pRT
Copy link
Author

p5pRT commented Apr 25, 2009

From schmonz@schmonz.com

Like tsibley, I can confirm this with 5.10.0 on Linux 2.4.32 (as
provided by DreamHost) with /home thus​:

drwxrws--x 394 root staff 36864 2009-04-24 09​:17 /home

Any progress on a fix?

Thanks,

- Amitai

@p5pRT
Copy link
Author

p5pRT commented May 21, 2009

From i@h2l.name

I have the same problem when tried to install 5.10.0
Is there any progress about the issue?

Some information about the system I am using​:

$ cat /etc/issue
Debian GNU/Linux 3.1 \n \l

$ uname -a
Linux razzle
2.4.32-grsec+f6b+gr217+nfs+a32+fuse23+tg+++opt+c8+gr2b-v6.194 #1 SMP Tue
Jun 6 15​:52​:09 PDT 2006 i686 GNU/Linux

$ ls -dl /home
drwxrws--x 234 root staff 28672 2009-05-20 12​:47 /home/

@p5pRT
Copy link
Author

p5pRT commented Jan 16, 2010

From p5p@spam.wizbit.be

On Wed Aug 20 14​:15​:07 2008, italpro@​qs1213.pair.com wrote​:

This is a bug report for perl from italpro@​qs1213.pair.com,
generated with the help of perlbug 1.36 running under perl 5.10.0.

-----------------------------------------------------------------
[Please enter your report here]

When building Perl 5.10.0 under FreeBSD 6.2 (and I think more recent
versions) as well as a non-root (unprivilged user).

This happens because recent FreeBSD releases make /usr/home
unreadable
by regular users, and for some reasons perl installation fails if it
cannon opendir() that directory - and it probably shouldn't fail.
I asked the superuser to make that directory readable to me and perl
built and installed regularly.

==> HOW TO REPRODUCE

- Login as unprivileged user
- Unpack the perl 5.10 distribution
# sh Configure -de -Dprefix=/your/local/directory
# make

==> ERROR (reporting the last part of "make" output)

cd lib/unicore && ../../miniperl -I../../lib mktables -w
touch uni.data
`sh cflags "optimize='-O'" perlmain.o` perlmain.c
CCCMD = cc -DPERL_CORE -c -DHAS_FPSETMASK -
DHAS_FLOATINGPOINT_H
-fno-strict-aliasing -pipe -I/usr/local/include -std=c89 -O
+-Wall -ansi -W -Wextra -Wdeclaration-after-statement -Wendif-
labels

Making DynaLoader \(static\)

Makefile out-of-date with respect to ../../lib/Config.pm
../../config.h
Cleaning current config before rebuilding Makefile...
make -f Makefile.old clean > /dev/null 2>&1
../../miniperl "-I../../lib" "-I../../lib" Makefile.PL
"INSTALLDIRS=perl" "INSTALLMAN3DIR=none" "PERL_CORE=1"
"LIBPERL_A=libperl.a"
opendir(./../../../../..)​: Permission denied at
../../lib/File/Spec/Unix.pm line 478
opendir(./../../../../..)​: Permission denied at
../../lib/File/Spec/Unix.pm line 478
Writing Makefile for DynaLoader
==> Your Makefile has been rebuilt. <==
==> Please rerun the make command. <==
false
*** Error code 1

Stop in /usr/home/italpro/soft/perl-5.10.0/ext/DynaLoader.
make config failed, continuing anyway...
/miniperl​: not found
*** Error code 127

Stop in /usr/home/italpro/soft/perl-5.10.0/ext/DynaLoader.
*** Error code 1

[Please do not change anything below this line]
-----------------------------------------------------------------

This problem was fixed in perl-5.10.1 (and perl-5.11.x).

The cause​:
http​://rt.cpan.org/Public/Bug/Display.html?id=34971
Bug #34971 for ExtUtils-MakeMaker​: ExtUtils​::MakeMaker Requires All
Parent

The fix​:
http​://cpansearch.perl.org/src/SMUELLER/PathTools-3.31/Changes

3.26 - Sun Jan 13 21​:59​:20 2008

- case_tolerant() on Cygwin will now avoid a painful death when
  Cygwin​::mount_flags() isn't defined, as is the case for perl <
  5.10. It will now just return 1, which is what it always did
  before it got so smart. [Spotted by Emanuele Zeppieri]

- abs_path() on Unix(ish) platforms has been upgraded to a much later
  version of the underlying C code from BSD. [Michael Schwern]

The diff​:
@​@​ -540,8 +540,8 @​@​
  local *PARENT;
  unless (opendir(PARENT, $dotdots))
  {
- _carp("opendir($dotdots)​: $!");
- return '';
+ # probably a permissions issue. Try the native command.
+ return File​::Spec->rel2abs( $start, _backtick_pwd() );
  }

Best regards,

Bram

@p5pRT
Copy link
Author

p5pRT commented Jan 16, 2010

p5p@spam.wizbit.be - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant