Skip Menu |
 

This queue is for tickets about the forks-BerkeleyDB CPAN distribution.

Report information
The Basics
Id: 29306
Status: resolved
Priority: 0/
Queue: forks-BerkeleyDB

People
Owner: RYBSKEJ [...] cpan.org
Requestors: jackowski.piotr [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Attachments


MIME-Version: 1.0
In-Reply-To: <52eff3410709111553r2d310491j701588e23cdcb7f0 [...] mail.gmail.com>
X-Spam-Status: No, hits=-2.6 required=8.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VERIFIED,DK_SIGNED,SPF_PASS
Content-Disposition: inline
References: <52eff3410709111553r2d310491j701588e23cdcb7f0 [...] mail.gmail.com>
content-type: text/plain; charset="utf-8"
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id 583F04D809A for <bug-forks-BerkeleyDB [...] rt.cpan.org>; Tue, 11 Sep 2007 20:46:04 -0400 (EDT)
Received: (qmail 10236 invoked by alias); 11 Sep 2007 22:57:10 -0000
Received: from nf-out-0910.google.com (HELO nf-out-0910.google.com) (64.233.182.186) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Tue, 11 Sep 2007 15:57:04 -0700
Received: by nf-out-0910.google.com with SMTP id b2so15026nfb for <bug-forks-BerkeleyDB [...] rt.cpan.org>; Tue, 11 Sep 2007 15:56:59 -0700 (PDT)
Received: by 10.78.146.11 with SMTP id t11mr2877511hud.1189551418982; Tue, 11 Sep 2007 15:56:58 -0700 (PDT)
Received: by 10.78.158.8 with HTTP; Tue, 11 Sep 2007 15:56:58 -0700 (PDT)
Delivered-To: cpan-bug+forks-berkeleydb [...] diesel.bestpractical.com
Subject: Multiuser problem
Return-Path: <jackowski.piotr [...] gmail.com>
Domainkey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=lkt9+ADXxhcrPOcf5agvj72dfyvnqFiC+8uf9E+CILxj4W72C4+bKWTQ2Am4RMojgbH54bBLrJOtVl31AT0jLbf6F8/3OcvKoUmNQi68SMZKGcLwTshB/2CedoOQfvHAk8g1ps91NRJCpD9aj3UPjKKksl0nB7RSyRXOcGCIfg8=
X-Original-To: bug-forks-BerkeleyDB [...] rt.cpan.org
X-Spam-Check-BY: la.mx.develooper.com
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=b1eH6HpcvYjShlap4jISvERCAnQBV6SsxMooIzUQMpE=; b=cKAux+Qn3m84xGJJ7MlJ8d1veTErkR1czO621/ZlQtUFQxjKKe1KQn/AHxI3QabYaG/Y/3rW8qYNrjPzjoeKshZai7JDZ/xTbEsEUaxPeIUPrhVHgd2siLkDftvlbLZnW+vSjClUhCUrV0kjBKfdtqaBrDb6OwoS1gGleohmBzk=
Date: Tue, 11 Sep 2007 15:56:58 -0700
Message-Id: <52eff3410709111556v743feacat5352d64c747f8071 [...] mail.gmail.com>
To: bug-forks-BerkeleyDB [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: "Piotr Jackowski" <jackowski.piotr [...] gmail.com>
X-RT-Original-Encoding: ISO-8859-1
Content-Length: 955
Download (untitled) / with headers
text/plain 955b
Hi, At the begging I would like to thank you for that superb modules forks and forks::BerkeleyDB. They are very useful for me. I'm using them in productive environment. But on my development environment many users use that module, and there is a problem with privileges. forks:: BerkeleyDB saves by default in /tmp/pelrforks/ENV_SUBPATH subdirectory shared variables. ENV_SUBPATH is defined in forks::BerkeleyDB::Config.pm with: use constant ENV_SUBPATH => int(ENV_PID / 100).'/'.ENV_PID.'/bdb'; where ENV_PID => $$ When one user will use forks::BerkeleyDB with for example with $$ == 30001 then module will create /tmp/perlforks/300/30001 directory But when another user with $$ == 30002, module will try to crate /tmp/perlforks/300/30002 that will crash with unable to create 30002 subdirectory and program dies:( So workerund for this is for example use constant ENV_SUBPATH => int(ENV_PID * 100).'/'.ENV_PID.'/bdb'; Regards, Peter
MIME-Version: 1.0
In-Reply-To: <52eff3410709111556v743feacat5352d64c747f8071 [...] mail.gmail.com>
X-Mailer: MIME-tools 5.418 (Entity 5.418)
References: <52eff3410709111553r2d310491j701588e23cdcb7f0 [...] mail.gmail.com> <52eff3410709111556v743feacat5352d64c747f8071 [...] mail.gmail.com>
Message-Id: <rt-3.6.HEAD-28497-1190432099-1779.29306-0-0 [...] rt.cpan.org>
Content-Type: multipart/mixed; boundary="----------=_1190432099-28497-2"
From: RYBSKEJ [...] yahoo.com
X-RT-Original-Encoding: utf-8
Content-Length: 0
Content-Disposition: inline
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 1256
Download (untitled) / with headers
text/plain 1.2k
Peter, Sounds likely that the user's umask is affecting the default permissions that mkdir users. Try the attached patch on a clean forks::BerkeleyDB 0.51 distribution. -Eric On Tue Sep 11 20:46:41 2007, jackowski.piotr@gmail.com wrote: Show quoted text
> Hi, > > At the begging I would like to thank you for that superb modules forks and > forks::BerkeleyDB. They are very useful for me. I'm using them in
productive Show quoted text
> environment. > > But on my development environment many users use that module, and there > is a problem with privileges. > forks:: BerkeleyDB saves by default in /tmp/pelrforks/ENV_SUBPATH > subdirectory shared variables. > ENV_SUBPATH is defined in forks::BerkeleyDB::Config.pm with: > use constant ENV_SUBPATH => int(ENV_PID / 100).'/'.ENV_PID.'/bdb'; > where ENV_PID => $$ > > When one user will use forks::BerkeleyDB with for example with $$ ==
30001 Show quoted text
> then module will create /tmp/perlforks/300/30001 directory > > But when another user with $$ == 30002, module will try to crate > /tmp/perlforks/300/30002 that will crash with unable to create > 30002 subdirectory and program dies:( > > So workerund for this is for example > use constant ENV_SUBPATH => int(ENV_PID * 100).'/'.ENV_PID.'/bdb'; > > > Regards, > Peter
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Type: multipart/mixed; boundary="----------=_1190432098-28497-1"
Content-Length: 0
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 0
Content-Type: text/x-patch; name="forks.pm.0.51.multiuser.patch"
Content-Disposition: inline; filename="forks.pm.0.51.multiuser.patch"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: ascii
X-RT-Original-Encoding: ascii
Content-Length: 564
--- forks.pm.0.51 2007-09-21 23:28:57.953125000 -0400 +++ forks.pm.0.51.patched 2007-09-21 23:33:52.968750000 -0400 @@ -102,9 +102,11 @@ my $curpath = ''; foreach (split(/\//o, ENV_PATH)) { $curpath .= $_ eq '' ? '/' : "$_/"; - next if -d $curpath; - my $status = mkdir $curpath, 0777; - _croak( "Can't create directory ".ENV_ROOT ) unless $status; + unless (-d $curpath) { + my $status = mkdir $curpath, 0777; + _croak( "Can't create directory ".ENV_ROOT.': '.$! ) unless $status || -d $curpath; + } + chmod 0777, $curpath; } }
MIME-Version: 1.0
In-Reply-To: <52eff3410709111556v743feacat5352d64c747f8071 [...] mail.gmail.com>
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Message-Id: <rt-3.6.HEAD-22587-1192759729-1792.29306-0-0 [...] rt.cpan.org>
References: <52eff3410709111553r2d310491j701588e23cdcb7f0 [...] mail.gmail.com> <52eff3410709111556v743feacat5352d64c747f8071 [...] mail.gmail.com>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 124
Download (untitled) / with headers
text/plain 124b
Issue has been addressed in forks::BerkeleyDB 0.052. Temp directories are now no longer restricted by user's default umask.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.