I have a test server which I could FTP to using any program with the user "webadmin". Once logged in, I could add, delete, rename directories as I wish.
In my PHP application, I successfully connect to the server with the same username, however, it won't allow the creation of any directory.
Here is the test code:
Code: Select all
$ftp_host = 'localhost';
$ftp_user = 'webadmin';
$ftp_password = 'asdf123';
$conn_id = ftp_connect($ftp_host, 21) or die ("Cannot connect to ftp_host");
ftp_login($conn_id, $ftp_user, $ftp_password) or die("Cannot login");
ftp_mkdir($conn_id, "/path_to_folder/testing") or die("Couldn't create the directory");
ftp_close($conn_id);
PS: All files on the test server are owned by "webadmin" and have 775 permission (even 777 won't work).
Any thoughts?