Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!cica!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!samsung!shadooby!sharkey!itivax!scs From: scs@itivax.iti.org (Steve Simmons) Newsgroups: comp.unix.questions Subject: BSD vs SysV -- [ -w ] different? Summary: 'Writable' has special meaning for BSD directories? Message-ID: <4640@itivax.iti.org> Date: 12 Dec 89 15:15:32 GMT Organization: Industrial Technology Institute, Ann Arbor, MI. Lines: 20 I've run into what appears to be an incompatibility between SysV and BSD (and Ultrix), and wanted to get some feedback: Given a directory foo, with permissions 777 and owned by root, running as root the following bourne shell script gives different results: #!/bin/sh if [ -w foo ] ; then echo It is writable else echo It is not writable fi On Ultrix 3.0 (DecStation 3100, largely BSD) and UNIX V.2 (UNIX-PC) the result is 'It is writable'. On BSD (VAX 785, unmodified /bin/sh) the result is 'It is not writable'. Is this correct? And if so, why? -- Steve Simmons scs@iti.org Industrial Technology Institute '"You're not a big name on Usenet until someone puts you in their .sig file." -- Anonymous'