develooper Front page | perl.perl5.porters | Postings from August 2009

[perl #68612] rights problem with perl

Thread Previous | Thread Next
From:
perlbug-followup
Date:
August 18, 2009 04:33
Subject:
[perl #68612] rights problem with perl
Message ID:
rt-3.6.HEAD-2466-1250534443-1176.68612-75-0@perl.org
# New Ticket Created by  sstrickroth@gym-oha.de 
# Please include the string:  [perl #68612]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=68612 >



This is a bug report for perl from sstrickroth@gym-oha.de,
generated with the help of perlbug 1.36 running under perl 5.10.0.


-----------------------------------------------------------------
[apache@proxy /tmp]$ id
uid=48(apache) gid=48(apache) groups=16(nagcmd),48(apache)
[apache@proxy /tmp]$ cat bug.pl
#!/usr/bin/perl
use File::Copy;
print copy("/usr/www/cgi-bin/daten/newsanzeiger/Projekttag.jpg","/tmp/1")."\n";
system("cat /usr/www/cgi-bin/daten/newsanzeiger/Projekttag.jpg");
[apache@proxy /tmp]$ mount
//fileserver/newsanzeiger on /usr/www/cgi-bin/daten/newsanzeiger type cifs (ro,mand,noexec,nosuid,nodev)
[apache@proxy /tmp]$ ls -las /usr/www/cgi-bin/daten/newsanzeiger/Projekttag.jpg
68 -rwxrwx--- 1 root apache 63913 Aug 17 14:58 /usr/www/cgi-bin/daten/newsanzeiger/Projekttag.jpg
[apache@proxy /tmp]$ head /usr/www/cgi-bin/daten/newsanzeiger/Projekttag.jpg
ÿØÿàJFIFÿÛC
 $.' ",#(7),01444'9=82<.342ÿÛC
2!!22222222222222222222222222222222222222222222222222ÿÐÀ"ÿÄÄÿÚ
å\]Lªå°2ÇÚ¹"ÒI<°2ÀË,»U$R
񒫪,
...
[apache@proxy /tmp]$ ./bug.pl
1
cat: /usr/www/cgi-bin/daten/newsanzeiger/Projekttag.jpg: Permission denied
[apache@proxy /tmp]$

User/group apache has the rights to open that file, but with perl: no.


[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=critical
---
Site configuration information for perl 5.10.0:

Configured by Mandriva at Thu Apr  9 15:16:51 MEST 2009.

Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
  Platform:
    osname=linux, osvers=2.6.29.1-grsec, archname=i386-linux-thread-multi
    uname='linux sven 2.6.29.1-grsec #2 smp wed apr 8 22:30:03 mest 2009 i686 intel(r) core(tm)2 quad cpu q6600 @ 2.40ghz gnulinux '
    config_args='-des -Dinc_version_list=5.8.8 5.8.7 5.8.6 5.8.5 5.8.4 5.8.3 5.8.2 5.8.1 5.8.0 5.6.1 5.6.0 -Darchname=i386-linux -Dcc=i586-mrtux-linux-gnu-gcc -Doptimize=-O2  -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -fomit-frame-pointer -march=i586 -mtune=generic -fasynchronous-unwind-tables -DDEBUGGING=-g -Dprefix=/usr -Dvendorprefix=/usr -Dsiteprefix=/usr -Dsitebin=/usr/local/bin -Dsiteman1dir=/usr/local/share/man/man1 -Dsiteman3dir=/usr/local/share/man/man3 -Dman3ext=3pm -Dcf_by=MrTux -Dmyhostname=localhost -Dperladmin=root@localhost -Dcf_email=root@localhost -Dd_dosuid -Ud_csh -Duseshrplib -Duseithreads -Di_db -Di_ndbm -Di_gdbm'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=undef, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='i586-mandriva-linux-gnu-gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
    optimize='-O2 -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -fomit-frame-pointer -march=i586 -mtune=generic -fasynchronous-unwind-tables -g',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -I/usr/local/include -I/usr/include/gdbm'
    ccversion='', gccversion='4.3.2', 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='i586-mandriva-linux-gnu-gcc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    libc=/lib/libc-2.8.so, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version='2.8'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/usr/lib/perl5/5.10.0/i386-linux-thread-multi/CORE'
    cccdlflags='-fPIC', lddlflags='-shared -O2 -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -fomit-frame-pointer -march=i586 -mtune=generic -fasynchronous-unwind-tables -g -L/usr/local/lib'

Locally applied patches:
    Mandriva Linux patches

---
@INC for perl 5.10.0:
    /usr/lib/perl5/site_perl/5.10.0/i386-linux-thread-multi
    /usr/lib/perl5/site_perl/5.10.0
    /usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi
    /usr/lib/perl5/vendor_perl/5.10.0
    /usr/lib/perl5/5.10.0/i386-linux-thread-multi
    /usr/lib/perl5/5.10.0
    /usr/lib/perl5/site_perl
    /usr/lib/perl5/vendor_perl/5.8.8
    /usr/lib/perl5/vendor_perl/5.8.7
    /usr/lib/perl5/vendor_perl/5.8.5
    /usr/lib/perl5/vendor_perl
    .

---
Environment for perl 5.10.0:
    HOME=/home/sstrickroth
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/games:/home/sstrickroth/bin
    PERL_BADLANG (unset)
    SHELL=/bin/bash


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About