Solved

No such file or directory

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
AIX print queues constantly going down 11 490
sudo logging 5 80
linux  centos   virtualization network quetion 6 75
Where to get php 5.6 for AIX 7.1? 5 82
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…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
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.:
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.

867 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

24 Experts available now in Live!

Get 1:1 Help Now