From owner-freebsd-questions Sat Aug 18 17:31:35 2001 Delivered-To: freebsd-questions@freebsd.org Received: from ren.sasknow.com (ren.sasknow.com [207.195.92.131]) by hub.freebsd.org (Postfix) with ESMTP id A245237B410 for ; Sat, 18 Aug 2001 17:31:31 -0700 (PDT) (envelope-from ryan@sasknow.com) Received: from localhost (ryan@localhost) by ren.sasknow.com (8.9.3/8.9.3) with ESMTP id SAA35609; Sat, 18 Aug 2001 18:31:29 -0600 (CST) (envelope-from ryan@sasknow.com) Date: Sat, 18 Aug 2001 18:31:29 -0600 (CST) From: Ryan Thompson To: Duke Normandin <01031149@3web.net> Cc: Freebsd Questions Subject: Re: Perl and permissions In-Reply-To: <20010818143219.A78199@mandy.rockingd.calgary.ab.ca> Message-ID: Organization: SaskNow Technologies [www.sasknow.com] MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Duke Normandin wrote to Freebsd Questions: > I'm trying to get a Perl script (mbx2mbox.pl) running w/o choking. The > script inhales 'Manip.pm' which in turn is suppose to read > '~/.GlobalManip.cnf' if the full path was given in the appropriate > variable in 'Manip.pm'. I can't get 'Manip.pm' to read that sucking > '~/.GlobalManip.cnf' file --- perms maybe? Should config-type files such > as the one mentioned have the same perms as the Perl module? Tia... > In general, those files need to be readable by the user the script is running as. If you are actually executing them (normally not the case), they have to have the execute bit set as well, even for root. Also, the same user needs read/search access to all of the directories along the path. First, confirm that, as that user, you can read the file. (cat ~/.GlobalManip.cnf is a good indicator). You should verify the permissions, but maybe that's not the culprit in this case: It looks like you are trying to use the ``~'' expansion in your Perl code. (It's either that, or you used it in your email as a shortcut). Perl does not support the ``~'' expansion like the login shells do. If you want to include the file ".GlobalManip.cnf" in the user's home directory, expand it thus: $filename = sprintf "%s/.GlobalManip.cnf", $ENV{"HOME"}; require $filename - Ryan -- Ryan Thompson Network Administrator, Accounts SaskNow Technologies - http://www.sasknow.com #106-380 3120 8th St E - Saskatoon, SK - S7H 0W2 Tel: 306-664-3600 Fax: 306-664-1161 Saskatoon Toll-Free: 877-727-5669 (877-SASKNOW) North America To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message