FTP libURLftpUploadFile error

Bringing the internet highway into your project? Building FTP, HTTP, email, chat or other client solutions?

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
Eric_Taquet
Posts: 29
Joined: Wed Feb 14, 2007 3:26 pm
Location: FRANCE, Villeneuve d'Ascq

FTP libURLftpUploadFile error

Post by Eric_Taquet » Mon Oct 11, 2021 12:54 pm

Hello,
I have been developing with Livecode for a long time, but I'm new to FTP commands.

I need to upload to my website hosted by OVH, which uses the "Pure-FTPd" FTP server. Usually I used Fetch (on Mac) but now I need to automate the transfers.

My current problem: in this example : I only have the error “error” which returns as the second parameter of the callback message of the command :

libURLftpUploadFile filePath, uploadURL, callbackMessage

- filePath: the path to a simple text file “test.txt”
- uploadURL: uploadURL0 & "test.txt"
- uploadURL0: ftp://myUsername:myPassword@ftp.cluster ... h.net/www/

I replaced my real username and password.

The uploadURL0 is correct because I got no error using the same info, for example with:

put libURLftpCommand ("CWD www", "ftp.cluster014.hosting.ovh.net:21", myUsername, myPassword)
which gives: 250 OK. Current directory is /www

If libURLftpUploadFile, which probably uses the STOR command, gave a more explicit error code I could try to find the source of the error. But like that ...

Do you have a way to solve this problem ? Thanks !
Eric
The Erikoded Frenchy
La logique est le dernier refuge des gens sans imagination
Oscar Wilde :: Logic is the last refuge of the unimaginative

matthiasr
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 148
Joined: Sat Apr 08, 2006 7:55 am
Location: Lübbecke, Germany
Contact:

Re: FTP libURLftpUploadFile error

Post by matthiasr » Mon Oct 11, 2021 9:29 pm

To check if LC is able to upload to your server you could
use

Code: Select all

put URL... into URL "ftp://...
instead:

Code: Select all

put URL "binfile:pathToFile" into URL "ftp://myUsername:myPassword@ftp.cluster014.hosting.ovh.net/www/myFile" 
or if you upload a plain text file

Code: Select all

put URL "file:pathToFile" into URL "ftp://myUsername:myPassword@ftp.cluster014.hosting.ovh.net/www/myFile" 
Does that work?

Eric_Taquet
Posts: 29
Joined: Wed Feb 14, 2007 3:26 pm
Location: FRANCE, Villeneuve d'Ascq

Re: FTP libURLftpUploadFile error

Post by Eric_Taquet » Tue Oct 12, 2021 5:39 pm

Hi matthiasr … thanks for you help !

I tried as you suggested:

put URL ... into URL "ftp:// ...
put the result

... and the result is: tsneterr: (25) Failed FTP upload: 553

It's not an authentication problem because I can use the listing functions etc. Then I tested with the FTP command:

libURLftpCommand MKD test … -- it returns: 550 Can't create directory: Disk quota exceeded

I also tested with the Mac Fetch app: I can connect and browse the directories, but when I want to upload I have the same error!

But there are very few files on my site because I only do tests! Maybe I blocked something by doing too many tests ;-)

I've contacted OVH support and I'm waiting for an answer ...
The Erikoded Frenchy
La logique est le dernier refuge des gens sans imagination
Oscar Wilde :: Logic is the last refuge of the unimaginative

matthiasr
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 148
Joined: Sat Apr 08, 2006 7:55 am
Location: Lübbecke, Germany
Contact:

Re: FTP libURLftpUploadFile error

Post by matthiasr » Tue Oct 12, 2021 7:12 pm

Eric_Taquet wrote:
Tue Oct 12, 2021 5:39 pm

libURLftpCommand MKD test … -- it returns: 550 Can't create directory: Disk quota exceeded
That indicates, that you have no more space available to store data in that ftp account.
You could check the settings of that FTP account. Maybe you've set up the account with a quota. If you reach this quota then you cannot store anymore data into that account until you delete some other files or until you increase the quota for that account.

SparkOut
Posts: 2555
Joined: Sun Sep 23, 2007 4:58 pm

Re: FTP libURLftpUploadFile error

Post by SparkOut » Tue Oct 12, 2021 7:30 pm

I would not like to guarantee that it is a quota limitation. 550 is a generic file system error, mostly to do with either a wrong path being specified or permissions/authentication failure.
Anonymous ftp is handled differently, but I am getting a suspicion that the account has read-only permissions on the directory. That or the libUrl syntax to include the username and password is not correct. I have a feeling that it might be necessary to use the raw ftp commands, so STOR as you also wondered, but that will need to be preceeded by user and pass, with other commands for the passive/active and host/port values.
But it's hard to know, just guessing.

Eric_Taquet
Posts: 29
Joined: Wed Feb 14, 2007 3:26 pm
Location: FRANCE, Villeneuve d'Ascq

Re: FTP libURLftpUploadFile error

Post by Eric_Taquet » Tue Oct 12, 2021 8:52 pm

Hello all,

Today, my web site is exactly 16,6 Mo ! It is a test site to study LC FTP commands. I don't think the problem is quota space.

A few days ago I was allowed to upload, delete, and re-upload files, and delete and create directories, with the Mac Fetch app,

But the day before yesterday everything was blocked, while the volume of data on the site had only slightly changed!

Don't you think that the fact that I often caused FTP errors while testing LC commands would have blocked something, for security reasons?

Maybe I'm now considered a "pirate" as we say in French ;-)
The Erikoded Frenchy
La logique est le dernier refuge des gens sans imagination
Oscar Wilde :: Logic is the last refuge of the unimaginative

SparkOut
Posts: 2555
Joined: Sun Sep 23, 2007 4:58 pm

Re: FTP libURLftpUploadFile error

Post by SparkOut » Tue Oct 12, 2021 8:59 pm

I think it's possible but unlikely that you have been blacklisted. More likely that the Fetch app was set up correctly (have you tested with Fetch since having these problems?) - but probably that your hand-coded FTP tests are not formed correctly and so you are being denied.
I get very little chance to use an actual computer to test these days, if I did get a possible chance to try, I will see if I can see what FTP file upload options there are on a server I can test but don't hold your breath. It would be great to see more of your code to see what you are trying each time.

Eric_Taquet
Posts: 29
Joined: Wed Feb 14, 2007 3:26 pm
Location: FRANCE, Villeneuve d'Ascq

Re: FTP libURLftpUploadFile error

Post by Eric_Taquet » Tue Oct 12, 2021 9:07 pm

Yes, I've tested with Fetch since having these problems : I can't do anythins, as with LC libURLftpUpload !
The Erikoded Frenchy
La logique est le dernier refuge des gens sans imagination
Oscar Wilde :: Logic is the last refuge of the unimaginative

SparkOut
Posts: 2555
Joined: Sun Sep 23, 2007 4:58 pm

Re: FTP libURLftpUploadFile error

Post by SparkOut » Tue Oct 12, 2021 10:11 pm

OK, I have also managed some quick tests successfully and it looks like either you have a quota (ftp bandwidth upload/download) imposed on your account because of too much traffic (unlikely). Or some permission settings have changed, or you copy/pasted the user account details / password incorrectly into the script. This has then triggered a block because of suspicious activity.
I think you can only ask the hosting provider for assistance.

Post Reply

Return to “Internet”