kool_samule Posted March 4, 2010 Share Posted March 4, 2010 Hi Chaps, I'm tyring to make a PHP / FTP Application, where users can view/download/upload files in a given FTP site. I can connect to the FTP server, login using the credentials, but when I try to upload, or create a directory, I get: Warning: ftp_mkdir() [function.ftp-mkdir]: www: Access is denied. in C:\webserver\Apache2\htdocs\ftp\test.php on line 16 Line 16: if (ftp_mkdir($conn_id, $dir)) { echo "successfully created $dir\n"; } else { echo "There was a problem while creating $dir\n"; } As before, the credentials are correct, but I think there is a security issue somewhere what is blocking access. If anyone has any ideas what this could be, please share the wealth! Cheers Link to comment https://forums.phpfreaks.com/topic/194139-php-ftp-error-access-denied/ Share on other sites More sharing options...
teamatomic Posted March 4, 2010 Share Posted March 4, 2010 it is a permission problem. chmod the /ftp/ folder to 777 HTH Teamatomic Link to comment https://forums.phpfreaks.com/topic/194139-php-ftp-error-access-denied/#findComment-1021510 Share on other sites More sharing options...
kool_samule Posted March 5, 2010 Author Share Posted March 5, 2010 I have just tested creating a new directory using CuteFTP Pro and I got an error: Request denied. Please verify that the file or folder exists and that you have the necessary permissions on the server to perform the requested operation. Do you know what I should look for to get both FTP Client and my Web App to work correctly? Link to comment https://forums.phpfreaks.com/topic/194139-php-ftp-error-access-denied/#findComment-1021847 Share on other sites More sharing options...
kool_samule Posted March 5, 2010 Author Share Posted March 5, 2010 Looks like I had my FTP path wrong, it was trying to create a directory on the root, rather than in one of the accessible directories within the FTP site. Now sorted! Link to comment https://forums.phpfreaks.com/topic/194139-php-ftp-error-access-denied/#findComment-1021852 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.