On Apr 30, 2012, at 3:51 PM, Dinse, Gregg (NIH/NIEHS) [E] wrote: > Hi, > > Last week I moved from a Snow Leopard machine to a Lion machine. I thought I > checked out my primary software before finalizing the move, but apparently I > did not check carefully enough. > > I run SAS (statistical analysis software) remotely on a linux box. Someone > wrote a script for me that basically allows me to submit my SAS code (and my > data) to the linux box and then sends the output back to me. I know this is > clunky, but it has been working fine for many years, under Snow Leopard, > Leopard, Tiger, and so on. > > When I first moved to Lion, I tried running a SAS program and it seemed to > work. It turns out that if I do not edit the SAS script, it will run, but as > soon as I make a change and save the file, it will not run. I get the > following error message: > > -bash: ./nlin.csh: /bin/csh: bad interpreter: Operation not permitted > > I submit the job by typing "./nlin.csh" in a terminal window, where nlin.csh > is the name of the script that runs my SAS code. I can edit the file with > the SAS code and everything still works, but if I edit the script file (even > just typing a character and then deleting that character), I get the above > error. > > If anyone can help me with this, I sure would appreciate it. If you need > more information, please let me know. As you can tell, I don't know much > about UNIX and scripts. > > One last thing, which may not be relevant at all, but I did notice that the > owner seemed to be fine on my user files, but the group was not. On my old > machine the group was "staff", but on the Lion machine the group was "admin". > I used chown to change the group from "admin" to "staff" but it did not > solve the problem. I used the following command: > > chown -R :staff dinse > > where dinse is the name of my home directory. I hope I did not make things > worse. Nothing exploded, but the script still does not run. > > Thanks in advance for any help you can provide, > > Gregg
I'm not an authority on UNIX scripts, but I can offer a few things that have gotten me out of inexplicable issues in the past. 1) use "chgrp" not "chown" - it's a trivial difference and what you did is correct (AFAICT) but just to be safe. And you might consider changing the script file itself rather than the whole directory tree. Again, to be safe. 2) check your line endings/returns. Different editors and different OSs use different ones. I know if you've been getting this right in previous Mac OS/X versions, it should not matter, but just to try something to be sure that the act of saving a file does not convert it to bad line endings. 3) Check that the permissions are executable. I know it was, but maybe the act of saving the file changed it somehow? And make sure you can execute it. 4) Try using "sudo ./nlin.csh" to get around the permissions issue? (I know - dangerous in many ways, but if you just use it for this one attempt and it solves the problem, then you know it's a permissions issue. I have not done much under the hood on Lion yet, so I don't know what else might have changed (did the default shell change? is it now sh, csh or bash? maybe there's something that's shell-specific?), but maybe one of these steps will help point the direction? It's not much, but it's worked for me in the past, so I hope it helps in some way.... Jeff_______________________________________________ MacOSX-talk mailing list [email protected] http://www.omnigroup.com/mailman/listinfo/macosx-talk
