Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 417
  • Last Modified:

dos2unix through web gives error: Couldn't open output file udiiaqHC

I need to remove dos characters from a text file from my html page.

I wrote the following lines in a perl file cleanup.pl
 and added the line  <!--#exec cmd="./ident.pl" -->  in my html file

$d=`dos2unix results.txt  results.txt`;  //results.txt has permission 777
print "done...........";

This is the output I got:

dos2unix: Couldn't open output file udiiaqHC.
                 Permission denied. done...........

Any idea why this error comes up?
I found that udiiaqHC is a random thing, if I do a page refresh, I get some other string like udpQayIC
0
rajasree
Asked:
rajasree
  • 2
1 Solution
 
rajasreeAuthor Commented:
typo error above.  
my html file calls cleanup.pl
<!--#exec cmd="./cleanup.pl" -->

cleanup.pl has contents:
$d=`dos2unix results.txt  results.txt`;  //results.txt has permission 777
 print "done...........";
0
 
dorwardCommented:
It looks like it is trying to create a tempory file, possible in the same directory, possibly elsewhere. Make sure the webserver has permission to write to that directory.
0
 
rajasreeAuthor Commented:
Cool!
It worked when I changed the directories permissions.

Thanks for your help,
Cheers!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now