home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / unix / shell / 5455 < prev    next >
Encoding:
Text File  |  1993-01-21  |  819 b   |  35 lines

  1. Newsgroups: comp.unix.shell
  2. Path: sparky!uunet!elroy.jpl.nasa.gov!jato!csi!mwette
  3. From: mwette@csi.jpl.nasa.gov (Matt Wette)
  4. Subject: weird propery of test under root
  5. Message-ID: <1993Jan21.213702.9288@csi.jpl.nasa.gov>
  6. Originator: mwette@mr-ed
  7. Sender: usenet@csi.jpl.nasa.gov (Network Noise Transfer Service)
  8. Nntp-Posting-Host: mr-ed
  9. Organization: Jet Propulsion Laboratory
  10. Date: Thu, 21 Jan 1993 21:37:02 GMT
  11. Lines: 22
  12.  
  13.  
  14. OS: SunOS 4.1.3
  15.  
  16. Here's something weird:
  17.     test -x file
  18. under root always says file is executable
  19.  
  20. mr-ed# sh
  21. # touch xyz  
  22. # if [ -x xyz ]; then echo executable; else echo not executable; fi
  23. executable
  24.  
  25. # su mwette
  26. mr-ed$ sh
  27. $ if [ -x xyz ]; then echo executable; else echo not executable; fi
  28. not executable
  29.  
  30. Why?  How can I get around this behaviour under root?
  31.  
  32. Matt
  33. -- 
  34. mwette@csi.jpl.nasa.gov
  35.