Solved

No such file or directory

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
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…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

762 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now