Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Our Archives > General Archives > Servers > Making a directory "writeable".......

 
Making a directory "writeable".......
Thread Tools
Mac Enthusiast
Join Date: Feb 2001
Location: Work: NYC Live: NJ
Status: Offline
Dec 4, 2002, 10:37 AM
 
I've been playing around with php a bit and now I'm trying to use the command:
[php]$filepointer = fopen("data.txt", "w");[/php]

Whenever I use this command though I get the error:
Code:
Write to a file Warning: fopen("data.txt", "w") - Permission denied in /Users/shadybirdstan/Sites/php/ch5.1.php on line 10
Keep in mind I'm just messing around on my local machine because normally I would just call my host and ask them. Is this happenening because I need to setup write access on my local machine or something?

Any help would be GREATLY appreciated.
(Last edited by shadybirdstan; Dec 4, 2002 at 10:44 AM. )
     
Clinically Insane
Join Date: Apr 2000
Status: Offline
Dec 6, 2002, 07:15 AM
 
I don't know anything about all this, but... I'll try... does the user executing the script have write access to the necessary area?
     
Fresh-Faced Recruit
Join Date: Dec 2002
Status: Offline
Dec 12, 2002, 01:26 AM
 
you need to use chmod, open up the command line/terminal, browse to the directory using cd, and then type in

chmod 777 data.txt

that should fix it
     
 
   
Thread Tools
Forum Links
Forum 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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 03:53 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2