Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 06-08-2003, 08:13 AM   #1
LQ Newbie
Registered: Jan 2003
Location: New York
Distribution: RedHat 8.0
Posts: 14

Rep: Reputation: 0
Perl, File-Write Permissions Problem


Good Morning.

I have genuine RedHat 8.0 Professional since last 6 months (may be more).

I Can't write to a file with Perl: I wanted to learn perl, till I got to a point where script reads/writes to a local file:
open (OUTF, ">>MyFile.txt") or dienice("Could not open MyFile.txt, $!");

When I run it, I get - "Could not open MyFile.txt, Permission Denied"

I created a file manually, as MyFile.txt, set chmod to +777, but get the same thing.

(I hated to write this, but I'm sure I'll get into more problems when I get into MySQL)

Any help greatly appreciated.



Last edited by SoftwareParadis; 06-08-2003 at 12:30 PM.
Old 06-08-2003, 03:02 PM   #2
LQ Newbie
Registered: Jan 2003
Location: New York
Distribution: RedHat 8.0
Posts: 14

Original Poster
Rep: Reputation: 0

It worked now. The problem was, I was using the script on the http server (apache), and I guess the script was trying to write to the file in the Perl exec. folder (relative path), 'coz I didn't mention the absolute path. After mentioning complete path, it worked.

Thanks Anyway.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP not working eikeland Linux - Software 4 07-13-2005 07:00 PM
Help getting php working TheDirtyPenguin Linux - Software 12 03-19-2004 05:19 AM
PHP Not working.. Dirt Linux - Newbie 1 06-06-2003 08:22 PM
PHP not working Tekime Slackware 6 08-22-2002 03:01 PM
PHP Not working? hubergeek Linux - Software 1 03-26-2002 10:29 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:23 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration