Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Oct 1998 14:47:54 -0800 (PST)
From:      Kevin Marcus <kmarcus@saturn.infospace.com>
To:        Jason McNew <jase@clearsail.net>
Cc:        database@FreeBSD.ORG
Subject:   Re: can't open a db file as 'nobody' despite 0666
Message-ID:  <Pine.LNX.3.96.981027144744.1983A-100000@saturn.infospace.com>
In-Reply-To: <36364295.3956221F@clearsail.net>

next in thread | previous in thread | raw e-mail | index | archive | help
does nobody have a valid shell?

 Kevin Marcus   -*-   mailto:kmarcus@infospace.com   -*-  Sr. Software Engr
        -*@*-        I n f o S p a c e . c o m,  I n c.        -*@*-
                          "The Ultimate Directory"
 Redmond, WA              http://www.infospace.com            (425)882.1602

On Tue, 27 Oct 1998, Jason McNew wrote:

> I'm using DB_File.pm which is a wrapper for db(3), and for some reason I
> can't open any database files if I'm the user 'nobody'.  If I run it as
> a normal user (not owner or group member of the file in question), my
> program works fine.  But, if I su over to 'nobody', it's instantly
> broken.  I checked the db(3) manpage, but I diden't see anything about
> it in there.  I also read DB_File.pm's POD docs and still no luck.  The
> error I'm getting is "permission denied."
> 
> Here is the simplest program I could write that duplicates the problem:
> 
> #!/usr/local/bin/perl
> use DB_File;
> $db = '/home/jase/test.db';
>     tie %urldb, 'DB_File', $db, O_RDONLY, 0666, $DB_BTREE or
> die("coulden't open $db: $!");
> 
> whereas /home/jase/test.db is -rw-rw-rw-
> 
> When I try to do this from a cgi script (apache runs as nobody) it spits
> out:
> 
> coulden't open /home/jase/test.db: Permission denied at test.pl line 4.
> 
> But the same scirpt runs just fine even when I run it as a user in a
> different group... except when I su to nobody..
> 
> %/usr/local/bin/perl -v
> 
> This is perl, version 5.005_51 built for i386-freebsd
> 
> 
> I can work around this by making apache run as a different user, but I'd
> still like to know why this brakes, and better still, where it needs to
> be documented (provided it's not pilot error!) :)
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-database" in the body of the message
> 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-database" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.3.96.981027144744.1983A-100000>