LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


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

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


Hi,

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.

Thanks,

SoftwareParadise

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

Original Poster
Rep: Reputation: 0
Worked!!

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.
 
  


Reply


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 08:00 PM
Help getting php working TheDirtyPenguin Linux - Software 12 03-19-2004 06:19 AM
PHP Not working.. Dirt Linux - Newbie 1 06-06-2003 09:22 PM
PHP not working Tekime Slackware 6 08-22-2002 04:01 PM
PHP Not working? hubergeek Linux - Software 1 03-26-2002 11:29 AM


All times are GMT -5. The time now is 06:24 AM.

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