directory/file access for apache 2 on winxp pro

im running apache 2 with php4 on windows xp pro... i used to use ms iis 5 webserver and they allowed me to do directory read/write access.. i have a php script that requires a text file to be writable.. is there a way to make a single file or directory writable (or chmod 777 equivalent)? i've searched all over the net and couldnt find any topics on this.....
yingjaiAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
harwantgrewalConnect With a Mentor Commented:
I suggest you to work in NTFS its good. make a small parttion for you work and make it NTFS and work on it.

harry
0
 
harwantgrewalCommented:
just check the security permission of the directory and add everyone with full permission there and while writing mention full path to the file and do same for the permission of the file.

Harry
0
 
yingjaiAuthor Commented:
lol.. i kinda got lost after the 'add everyone with full permission' part...
0
Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

 
harwantgrewalCommented:
lost where its simple what problem you are facing now

harry
0
 
yingjaiAuthor Commented:
i am trying to configure file permission/folder permission on windows xp for apache2 webserver... if i do the "add everyone with full permission" to the folder, isnt that only for iis?
0
 
harwantgrewalCommented:
no no you have to do it from the windows explorer right click on the directory and then click property then security this will solve your problem


Harry
0
 
yingjaiAuthor Commented:
in the folder properties, i only see 3 tabs... general, sharing, and customize
0
 
harwantgrewalCommented:
I guess that the folder is in FAT32 partation so you will not able to see the permission tab and for FAT32 there should not be any problem for access denied thing what error are you getting while running your script and you post the code here.

or try this in httpd.cong

<Directory your directory path>
     Order Deny,Allow
     Allow from all
 </Directory>
Harry
0
 
yingjaiAuthor Commented:
what does this line do anyways?
"    Order Deny,Allow"
0
 
harwantgrewalCommented:
this tells tells the order suppose A user belong to group GA and GA has deny to directory c:\www and user A also belong to group GB and GB is allowed to directory c:\www so now the order plays part that user A is denied to access directory c:\www as order deny has first then allow

Harry
0
 
yingjaiAuthor Commented:
wait.. should i put
    Order Allow,Deny
instead? because im trying to make the folder writable...
0
 
harwantgrewalCommented:
yes go ahead and also give me the code through which you are trying to write file.

Harry
0
 
yingjaiAuthor Commented:
this code was found in a php website.. one of those cut and paste scripts...

<?php
// ################  Edit Variables     ######################

$datfile = "shout.txt";
// This is the name of text file where all
// the text is stored.

// Simply include this file where yo want
// the text to appear in your page.
/* example:  include("shout.txt")  */
// see test.php and the readme for further help.


$MAX_LENGTH = 35;
// This is the max length of the user's entry.  you should
// also make your input box's maxlength the same number or smaller
//  Basically this is just for error checking and to make sure
// the script was called from the page, not by itself.


$NUM_COMMENTS = 10;
// Make this bigger to show more  or smaller to show less.

/* NOTE:  There is no max length for the NAME, if you so desire one,
simply limit the amount of characters that one can enter in the field. */

// #############  DO NOT EDIT BELOW THIS LINE  ################

if (!$name)
{ $name = ">>"; }
else $name .= ":";

$c = preg_replace("/</","&lt;",$c);
$c = preg_replace("/>/","&gt;",$c);

$comfile = file($datfile);
if ($c != "") {
if (strlen($c) < $MAX_LENGTH) {
$fd = fopen ($datfile, "w");
$c = stripslashes($c);
fwrite ($fd, "<div style='width:112px; overflow:hidden'><i>$name</i> $c</div>\n");
for ($i = 0; $i < $NUM_COMMENTS; $i++) {
fwrite ($fd, $comfile[$i]);
}
}
fclose($fd);
}
Header("Location: $HTTP_REFERER");
?>
0
 
harwantgrewalCommented:
This code works perfect with me. But I have NTFS and the file is having everyone full permission. Not able to understand what the cause check that file is not readonly. and the httpd.conf directive help you?

Harry
0
 
yingjaiAuthor Commented:
lol.. i think i need detailed instructions from installing php (getting the codes in httpd.conf) to getting the script to run... because im having a hard time.. i moved the website directory to c:/ to make it easier.. but it seemed the same... (c:/ is my ntfs partition).. if it is possible, i want to move my website back to d:/ (fat32)
0
 
yingjaiAuthor Commented:
i format my computer alot and everytime, i forget to back up sumthing from my c:/
0
 
yingjaiAuthor Commented:
should i set the whole new partition to full control for everyone?
0
 
harwantgrewalCommented:
no need just make c for install d for backup or dump and e for development just from in NTFS not need to change to permissions okay. just make all the installation then just change permission for the folder where you want to write the file.

Harry
0
 
yingjaiAuthor Commented:
so you mean uncheck everything for permissions for everyone?
0
 
harwantgrewalCommented:
no need to change any permission after formating or converting to NTFS leave it untouch.

Harry
0
All Courses

From novice to tech pro — start learning today.