Page 1 of 1

Folder atributes and FTP pro 2006

Posted: Sun Oct 09, 2005 4:11 pm
by rdelnoy
feyd | Please use

Code: Select all

and

Code: Select all

tags where appropriate when posting code. Read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]


Hello I've used a script that creates a foldersctructure and creates a html-file within the last folder of the path. This works well. But I cant delete any folder or the file itself within this path. I also can't chanche the folder permissions of any folder or file. It looks like I dont have any rights to change the atributes.

Is it the script that has changed the permissions? Does anyone have a solution? 

I work with FTP-PRO 2006.

The scriping part of a phpt:

Code: Select all

//creating the path to the file (as it probably wasn't there already)
$current_folder = "sended_forms_in_html";
mkdir($current_folder);
$current_folder = $current_folder."/"."formname";
mkdir($current_folder);
$current_folder = $current_folder."/"."nl";
mkdir($current_folder);
//saving the file
$fp = fopen($current_folder."/".$current_answerfile.".html","w+");
fwrite($fp, $html_message, 100000); 
fclose( $fp );
Can anyone please help me out!

Cheers.

Ralph


feyd | Please use

Code: Select all

and

Code: Select all

tags where appropriate when posting code. Read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]

Posted: Sun Oct 09, 2005 4:38 pm
by feyd
the script was run under a different user's credentials (the one the web server runs under.) You will need to create a script or alter this one to chmod() the file and/or folder permissions to allow your user to alter it.

Posted: Sun Oct 09, 2005 4:45 pm
by rdelnoy
feyd wrote:the script was run under a different user's credentials (the one the web server runs under.) You will need to create a script or alter this one to chmod() the file and/or folder permissions to allow your user to alter it.
Thanks, I now understand how this could happen. But do you know a script that (re)chanches the folder atributes? Isn't there a way to to it right on the folder or file creation itself?