Solved

No such file or directory

Posted on 2001-09-08
5
177 Views
Last Modified: 2010-04-22
I just created a .cgi file and tried to run it from the command line.  I get the error
No such file or directory.

Permissions are set to 745.  The file is there. I have another cgi file in the same directory that executes from the command line.

Any ideas what's going on?
0
Comment
Question by:castello
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 6

Expert Comment

by:bira
ID: 6468142
Hi
please post an ls -l yourfile  and a ls -l of the other file
that is in the same directory and executes.
0
 

Author Comment

by:castello
ID: 6468275
the file that won't run:
-rwxr--r-x     1 me     me          1085 Sep 8 23:10 print.cgi


the file that will run:
-rwxr--r-x     1 me     me          1104 Sep 7 10:57 vewpaghit.cgi  
0
 
LVL 6

Expert Comment

by:bira
ID: 6468649
Very strange

     I would advise you to to the following:
 -  Recreate print.cgi
 -  chmod it 777
 -  If you have Korn Shell,  try to run it :
        ksh -x print.cgi

 - If "No such file or directory" still appears, check
   if the script internally is trying to access a file
   or directory that does no exist.
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 100 total points
ID: 6468887
you specified a wrong interpreter in the very first line of the script (following the #!).
0
 

Author Comment

by:castello
ID: 6470422
I forgot the / after #!
0

Featured Post

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question