home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / perl / 7672 < prev    next >
Encoding:
Text File  |  1993-01-05  |  1.5 KB  |  50 lines

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