Solved

No such file or directory

Posted on 2001-09-08
5
175 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
  • 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
LINUX ZIP - UNCOMPRESS WINDOWS PATH 3 104
Python Assistance 7 86
Problem logging tar errors 11 65
Retreiving column names in Windows but not in Unix 11 61
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…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…

821 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