Page 1 of 1
FTP problem
Posted: Sun Apr 03, 2011 9:43 am
by Rksk
I uploaded a ZiP file with some files to my FTP account & used below php to extract them.
Code: Select all
$filename = $_GET['archive'];
if ($filename){
$zip = new ZipArchive;
if ($zip->open($filename) === TRUE) {
$zip->extractTo('./');
$zip->close();
echo 'The file <strong>'.$filename.'</strong> Extracted successfully';
unlink($filename);
} else {
echo 'failed';
}
}
But after it some files have filenames like
wap\contact\index.php. I can't rename or delete these files using filezilla, because it gets an error
550 Prohibited file name: wap\contact\index.php
There is a Screen capture of FileZilla, Please anyone help me to remove these files.

- Screen capture of FileZilla
- FTP.JPG (90.05 KiB) Viewed 8239 times
Thank you.
Re: FTP problem
Posted: Sun Apr 03, 2011 10:14 am
by Mysoogal
644, you need to chmod your files, into 755 ot 777
Re: FTP problem
Posted: Sun Apr 03, 2011 10:31 am
by Rksk
Mysoogal wrote:644, you need to chmod your files, into 755 ot 777
It is unable to do.
Status: Set permissions of '/wap\contact\index.php' to '777'
Command: SITE CHMOD 777 wap\contact\index.php
Response: 550 Prohibited file name: wap\contact\index.php
Re: FTP problem
Posted: Mon Apr 04, 2011 11:53 am
by Neo
I logged in using FTP and was able to delete the file /wap/contact/index.php without any problem.
Re: FTP problem
Posted: Mon Apr 04, 2011 1:58 pm
by Rksk
Neo wrote:I logged in using FTP and was able to delete the file /wap/contact/index.php without any problem.
No, the file is still there. I think you haven't understood my problem.
/wap/contact/index.php is a file name. It is in my Root. Goto my Root & scroll down, you will can see the problem.

- FTP.JPG (86.52 KiB) Viewed 8214 times
Thank you.
Re: FTP problem
Posted: Mon Apr 04, 2011 3:29 pm
by Neo
Yes. I misunderstood the problem earlier. I wasn't even able to delete it from my account so I informed the web admin to handle that. He was able to delete those files but seriously warned me on keeping all experiments away from the server.
He strictly informed me that if he understood that you do experiments that affects the stability of the server, he will disable the account

Can you do all the experiments in a local server like WAMP and move 100% safe codes to the server.
Re: FTP problem
Posted: Mon Apr 04, 2011 4:23 pm
by Rksk
It is not an experiment friend.
i always test my codes on my PC before upload to server. below the story,
normally, when i do a update in my codes, i add them a to ZIP and upload it to root dir. then i extract it using above php code. I used it only for files in ROOT.
But one day i had some updates in sub dirs also. i added all the updated files to a ZIP, uploaded it and extracted them. i didn't expect this result. because i thought above php code can extract ZIPs correctly.
Very sorry for the incident.
[ Post made via Mobile Device ] 