Reputation: 26875
I try to upload a file through PHP's ftp_put function, like so:
ftp_put($this->conn_id, $rempath, $locpath, $mode);
However I get the error "Cannot STOR." Nothing more. The FTP-connection is OK since I can download files using the same settings and ftp_get(). The script should be OK as well since it works fine on my local setup but not on my public server.
What can I try to make it work? I Googled but found nothing of worth.
Upvotes: 3
Views: 3713
Reputation: 12323
Cannot STOR
is a permission issue. Doublecheck the permissions for the FTP user.
Upvotes: 0
Reputation: 527
You should first check to make sure that you are able to upload using a regular FTP client. I see you say "there's no problem withmy FTP-client" but in the initial request you said you are able to download files successfully and failed to mention a successful upload. I believe you will find that uploading with a client will fail too because that message is the output of FTP and not PHP. Whether or not it is a permissions issue remains to be seen, but it is unlikely a PHP issue. Do a little more research on FTP error 550.
Upvotes: 1
Reputation: 1507
You should check to be sure you have write permissions on the directory into which you are trying to put the file(s).
Upvotes: 0
Reputation: 60559
Sounds like a permissions error. Are you sure you have permissions to upload the file to the location you are trying to put it at? If you try to do the upload manually via FileZilla or something does it work?
Upvotes: 0