473,396 Members | 1,799 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Permission Denied

rajiv07
141 100+
Hi to all,

I have a simple script to write something in to a file and read from the file.But it gives Permission Denied error

My Script

Expand|Select|Wrap|Line Numbers
  1. #!C:\Program Files\SWsoft\Plesk\Additional\Perl\bin\perl.exe
  2. use CGI::Carp 'fatalsToBrowser';
  3. use strict;
  4. use warnings;
  5. use CGI;
  6.  
  7. my $file="C:/Inetpub/vhosts/imi.in/cgi-bin/elearning/query/1.html";
  8.  
  9. chmod(0755,'C:/Inetpub/vhosts/imi.in/cgi-bin/elearning/query/');
  10.  
  11. open(FH,">$file") or die $!;
  12.  
  13. print FH "Rajiv";
  14.  
  15. close(FH);
  16.  
  17. open(FH,"$file") or die $!;
  18.  
  19. my @array=<FH>; 
  20.  
  21. close(FH);
  22.  
  23. print "Content-type:text/html\n\n";
  24.  
  25. print "Value=@array";
  26.  
  27. exit;
I am using Windows 2003 IIS 6.0 and Perl 5.8.8

my error


Permission denied at C:\Inetpub\vhosts\imi.in\cgi-bin\elearning\query\file_test.pl line 9.

Please help on this

Regards
Rajiv
Jun 24 '08 #1
1 2765
numberwhun
3,509 Expert Mod 2GB
Being you are on a Windows system, I don't know that you can use the Unix chmod() function in a Windows environment as I don't know that the Windows system can comprehend the way it sets permissions.

Typically, when you edit a file in Windows, you don't have to worry about the permissions as such, unless the file is specifically Read Only, but unless the file came from a CD or you specifically set it to be so, you shouldn't have to worry about that.


Regards,

Jeff
Jun 24 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Klunk | last post by:
Hi, last week I moved the folder of my Intranet application to another disk of the same server. After this change all the ASP page return this error: Microsoft VBScript runtime error...
6
by: Jon Montana | last post by:
CDONTS was working well until I installed Exchange 2000. I thought it might be a relay problem, but I allowed the server IP address to relay. Thanks for anything you can offer. here's the...
1
by: Mark E. Hamilton | last post by:
Sorry, I probably should have re-stated the problem: We're using Python 2.3.5 on AIX 5.2, and get the follow error messages from some of our code. I haven't yet tracked down exactly where it's...
10
by: Florian G. Pflug | last post by:
Hi I installed a postgres-application (which was developed on debian woody) on red hat 9 today, using the postgres 7.3 rpms from redhad. One of my the triggers uses the pg_settings table (more...
2
by: Taishi | last post by:
New user of SQL Everything is on the same machine My error is close to the bottom After reading it today, I can see there is a problem with 2 dbases 'PUBS' and 'Master' There are also some...
4
by: stephen | last post by:
Hi, I am getting an error while trying to create an excel file. "Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the...
0
by: debug03 | last post by:
I am executing a DTS package on a Windows 2000 sp4 server running SQL Server 2000 and IBM DB2 V7 client. The DTS package source data(SQL Server) is selected from SQL server table and inserts data to...
0
by: private.anders | last post by:
Hi David! Really need assistance since I have been struggling with a problem long time now. I am running a web application on a Win 2003 Std (Active Directory). Everything works fine. I have...
0
by: private.anders | last post by:
Really need your assistance since I have been struggling with a problem long time now. I am running a web application on a Win 2003 Std (Active Directory). Everything works fine. I have...
4
by: xzzy | last post by:
I have a v1.1 web app that works on my local computer. However, running it at the host computer, the following breaks: when a viewer selects a different country, the State dropdown should...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.