Folder atributes and FTP pro 2006

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
rdelnoy
Forum Newbie
Posts: 2
Joined: Sun Oct 09, 2005 3:51 pm

Folder atributes and FTP pro 2006

Post 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]
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
rdelnoy
Forum Newbie
Posts: 2
Joined: Sun Oct 09, 2005 3:51 pm

Post 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?
Post Reply