home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!fmrco!fmrco!asherman
- From: asherman@fmrco.com (Aaron Sherman)
- Subject: Re: Need help globbing.
- In-Reply-To: frazier@kona.cs.ucla.edu's message of Mon, 4 Jan 93 18:42:14 GMT
- Message-ID: <ASHERMAN.93Jan5145133@piranha.fmrco.com>
- Sender: news@fmrco.uucp
- Reply-To: asherman@fmrco.COM
- Organization: I-Kinetics, 19 Bishop-Allen Dr., Cambridge, MA
- References: <1i75peINN9pm@crcnis1.unl.edu> <1993Jan4.184214.5711@cs.ucla.edu>
- Date: Tue, 5 Jan 1993 19:51:33 GMT
- Lines: 36
-
-
- >>>>> frazier@kona.cs.ucla.edu (Gregory Frazier) said:
-
- Russell Mosemann (mosemann@unlinfo.unl.edu) wrote:
- :
- : What's wrong with this?
- :
- : chown($uid, $gid, <"$home/.*">);
- :
- : I get "csh: Permission denied.". I've tried various combinations of
- : <${home}/.*>, <${home}/.??*>, <${"$home/.*"}> (heh), etc., but that doesn't
- : work, either. The script is running setuid to root, and a previous line
- :
- : chown($uid, $gid, $home);
- :
- : works fine. Thanks.
-
- > The problem is that you are trying to change the ownership and
- > group of "~/..", which is not yours to change.
-
- Nope. The problem is that csh (which is what perl uses to resolve
- globbing in <>'s will not allow itself to be used if uid != euid.
- Stupid, but there it is. You need to do
-
- $< = $>;
-
- To make your uid the same as your euid.
-
-
- -AJS
-
- --
- --------
- Disclaimer: I am solely responsible for the content of this message.
- The views expressed here may not be the views of I-Kinetics, Fidelity,
- any of the Fidelity-owned corporations or my mother.
-