Re: [weewx-user] FTPS error in WeeWX version 4.0.0
On Tuesday, 12 May 2020 16:10:39 UTC+1, Leon Shaner wrote: > > Stephen, > > Not looking at the code, but shouldn't there be some prefix to these paths? > Nobody is going to let you write to root (/). > > It's relative to the ftp account home directory, not root on the server. If I set the path to something else the directory is created correctly in the ftp account's home directory. -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/39b07323-6de1-47b2-b921-47560cd17f63%40googlegroups.com.
Re: [weewx-user] FTPS error in WeeWX version 4.0.0
Stephen, Not looking at the code, but shouldn't there be some prefix to these paths? Nobody is going to let you write to root (/). > *put* 'MKD /\r\n' > *put* 'STOR /yearrain.png\r\n' > *put* 'MKD /font\r\n' > *put* 'MKD /font\r\n' > *put* 'MKD /font\r\n' Regards, \Leon -- Leon Shaner :: Dearborn, Michigan (iPad) > On May 11, 2020, at 1:30 PM, Stephen wrote: > > > > Hi > > My WeeWX installation is failing to upload files to my website. I'm using > FTPS and from the logs it looks like the connection to the server is made OK > but things go wrong as soon as the first file transfer is attempted. Using > an ftp client I can connect manually and write files successfully using FTPS. > The debug output and logs below are from running wee_reports but it also > fails when running as a daemon. > > There is another error when it tries to make the directory /font on the > server but I suspect that is a consequence of the earlier failure. At the > start the "MKD /" command behaves as expected. In addition there appears to > be a problem with the exception handling. > > This is a fresh install using apt-get on Ubuntu 19.10 but I have had the same > problem with WeeWX 3.9.2 on Ubuntu 16.04 LTS. Python is version 3.7.5. > > Can anyone help? > > Thanks > > Stephen > > -- > wee_reports output > -- > Using configuration file /etc/weewx/weewx.conf > Generating for all time > *get* '220-- Welcome to Pure-FTPd [privsep] [TLS] --\n' > *get* '220-You are user number 1 of 50 allowed.\n' > *get* '220-Local time is now 22:49. Server port: 21.\n' > *get* '220-This is a private system - No anonymous login\n' > *get* '220-IPv6 connections are also welcome on this server.\n' > *get* '220 You will be disconnected after 15 minutes of inactivity.\n' > *resp* '220-- Welcome to Pure-FTPd [privsep] [TLS] > --\n220-You are user number 1 of 50 allowed.\n220-Local time is now > 22:49. Server port: 21.\n220-This is a private system - No anonymous > login\n220-IPv6 connections are also welcome on this server.\n220 You will be > disconnected after 15 minutes of inactivity.' > *cmd* 'AUTH TLS' > *put* 'AUTH TLS\r\n' > *get* '234 AUTH TLS OK.\n' > *resp* '234 AUTH TLS OK.' > *cmd* 'USER u...@mydomain.com' > *put* 'USER u...@mydomain.com\r\n' > *get* '331 User u...@mydomain.com OK. Password required\n' > *resp* '331 User u...@mydomain.com OK. Password required' > *cmd* 'PASS ' > *put* 'PASS \r\n' > *get* '230 OK. Current restricted directory is /\n' > *resp* '230 OK. Current restricted directory is /' > *cmd* 'PBSZ 0' > *put* 'PBSZ 0\r\n' > *get* '200 PBSZ=0\n' > *resp* '200 PBSZ=0' > *cmd* 'PROT P' > *put* 'PROT P\r\n' > *get* '200 Data protection level set to "private"\n' > *resp* '200 Data protection level set to "private"' > *cmd* 'MKD /' > *put* 'MKD /\r\n' > *get* "550 Can't create directory: File exists\n" > *resp* "550 Can't create directory: File exists" > *cmd* 'TYPE I' > *put* 'TYPE I\r\n' > *get* '200 TYPE is now 8-bit binary\n' > *resp* '200 TYPE is now 8-bit binary' > *cmd* 'PASV' > *put* 'PASV\r\n' > *get* '227 Entering Passive Mode (185,24,98,215,210,73)\n' > *resp* '227 Entering Passive Mode (185,24,98,215,210,73)' > *cmd* 'STOR /yearrain.png' > *put* 'STOR /yearrain.png\r\n' > *get* '150 Accepted data connection\n' > *resp* '150 Accepted data connection' > *cmd* 'TYPE I' > *put* 'TYPE I\r\n' > *get* '' > > repeats last three lines > 200 times > > *cmd* 'TYPE I' > *put* 'TYPE I\r\n' > *get* '' > *cmd* 'MKD /font' > *put* 'MKD /font\r\n' > *get* '' > *cmd* 'MKD /font' > *put* 'MKD /font\r\n' > *get* '' > *cmd* 'MKD /font' > *put* 'MKD /font\r\n' > *get* '' > *cmd* 'QUIT' > *put* 'QUIT\r\n' > *get* '' > > --- > Log extract > --- > May 11 17:15:13 localhost wee_reports[17945] DEBUG weewx.reportengine: > Running report 'FTP' > May 11 17:15:13 localhost wee_reports[17945] DEBUG weewx.reportengine: Found > configuration file /etc/weewx/skins/Ftp/skin.conf for report 'FTP' > May 11 17:15:13 localhost wee_reports[17945] DEBUG weeutil.ftpupload: > Attempting secure connection to server.myhost.net > May 11 17:15:13 localhost wee_reports[17945] DEBUG weeutil.ftpupload: Secure > data connection to server.myhost.net > May 11 17:15:13 localhost wee_reports[17945] ERROR weeutil.ftpupload: Attempt > #1. Failed uploading /yearrain.png to server.myhost.net. Reason: [Errno 0] > Error > May 11 17:15:13 localhost wee_reports[17945] ERROR weeutil.ftpupload: Attempt > #2. Failed uploading /yearrain.png to server.myhost.net. Reason: > May 11 17:15:13 localhost wee_reports[17945] ERROR weeutil.ftpupload: Attempt > #3. Failed uploading /yearrain.png to server.myhost.net. Reason: > May 11 17:15:13 localhost wee_reports[17945] ERROR weeutil.ftpupload: Failed > to upload file /yearrain.png > May 11 17:15:13 localhost wee_reports[17945] ERROR weeutil.ftpupload: Attempt > #1. Failed uploading /seasons.css to server.m
[weewx-user] FTPS error in WeeWX version 4.0.0
Hi My WeeWX installation is failing to upload files to my website. I'm using FTPS and from the logs it looks like the connection to the server is made OK but things go wrong as soon as the first file transfer is attempted. Using an ftp client I can connect manually and write files successfully using FTPS. The debug output and logs below are from running wee_reports but it also fails when running as a daemon. There is another error when it tries to make the directory /font on the server but I suspect that is a consequence of the earlier failure. At the start the "MKD /" command behaves as expected. In addition there appears to be a problem with the exception handling. This is a fresh install using apt-get on Ubuntu 19.10 but I have had the same problem with WeeWX 3.9.2 on Ubuntu 16.04 LTS. Python is version 3.7.5. Can anyone help? Thanks Stephen -- wee_reports output -- Using configuration file /etc/weewx/weewx.conf Generating for all time *get* '220-- Welcome to Pure-FTPd [privsep] [TLS] --\n' *get* '220-You are user number 1 of 50 allowed.\n' *get* '220-Local time is now 22:49. Server port: 21.\n' *get* '220-This is a private system - No anonymous login\n' *get* '220-IPv6 connections are also welcome on this server.\n' *get* '220 You will be disconnected after 15 minutes of inactivity.\n' *resp* '220-- Welcome to Pure-FTPd [privsep] [TLS] --\n220-You are user number 1 of 50 allowed.\n220-Local time is now 22:49. Server port: 21.\n220-This is a private system - No anonymous login\n220-IPv6 connections are also welcome on this server.\n220 You will be disconnected after 15 minutes of inactivity.' *cmd* 'AUTH TLS' *put* 'AUTH TLS\r\n' *get* '234 AUTH TLS OK.\n' *resp* '234 AUTH TLS OK.' *cmd* 'USER u...@mydomain.com' *put* 'USER u...@mydomain.com\r\n' *get* '331 User u...@mydomain.com OK. Password required\n' *resp* '331 User u...@mydomain.com OK. Password required' *cmd* 'PASS ' *put* 'PASS \r\n' *get* '230 OK. Current restricted directory is /\n' *resp* '230 OK. Current restricted directory is /' *cmd* 'PBSZ 0' *put* 'PBSZ 0\r\n' *get* '200 PBSZ=0\n' *resp* '200 PBSZ=0' *cmd* 'PROT P' *put* 'PROT P\r\n' *get* '200 Data protection level set to "private"\n' *resp* '200 Data protection level set to "private"' *cmd* 'MKD /' *put* 'MKD /\r\n' *get* "550 Can't create directory: File exists\n" *resp* "550 Can't create directory: File exists" *cmd* 'TYPE I' *put* 'TYPE I\r\n' *get* '200 TYPE is now 8-bit binary\n' *resp* '200 TYPE is now 8-bit binary' *cmd* 'PASV' *put* 'PASV\r\n' *get* '227 Entering Passive Mode (185,24,98,215,210,73)\n' *resp* '227 Entering Passive Mode (185,24,98,215,210,73)' *cmd* 'STOR /yearrain.png' *put* 'STOR /yearrain.png\r\n' *get* '150 Accepted data connection\n' *resp* '150 Accepted data connection' *cmd* 'TYPE I' *put* 'TYPE I\r\n' *get* '' repeats last three lines > 200 times *cmd* 'TYPE I' *put* 'TYPE I\r\n' *get* '' *cmd* 'MKD /font' *put* 'MKD /font\r\n' *get* '' *cmd* 'MKD /font' *put* 'MKD /font\r\n' *get* '' *cmd* 'MKD /font' *put* 'MKD /font\r\n' *get* '' *cmd* 'QUIT' *put* 'QUIT\r\n' *get* '' --- Log extract --- May 11 17:15:13 localhost wee_reports[17945] DEBUG weewx.reportengine: Running report 'FTP' May 11 17:15:13 localhost wee_reports[17945] DEBUG weewx.reportengine: Found configuration file /etc/weewx/skins/Ftp/skin.conf for report 'FTP' May 11 17:15:13 localhost wee_reports[17945] DEBUG weeutil.ftpupload: Attempting secure connection to server.myhost.net May 11 17:15:13 localhost wee_reports[17945] DEBUG weeutil.ftpupload: Secure data connection to server.myhost.net May 11 17:15:13 localhost wee_reports[17945] ERROR weeutil.ftpupload: Attempt #1. Failed uploading /yearrain.png to server.myhost.net. Reason: [Errno 0] Error May 11 17:15:13 localhost wee_reports[17945] ERROR weeutil.ftpupload: Attempt #2. Failed uploading /yearrain.png to server.myhost.net. Reason: May 11 17:15:13 localhost wee_reports[17945] ERROR weeutil.ftpupload: Attempt #3. Failed uploading /yearrain.png to server.myhost.net. Reason: May 11 17:15:13 localhost wee_reports[17945] ERROR weeutil.ftpupload: Failed to upload file /yearrain.png May 11 17:15:13 localhost wee_reports[17945] ERROR weeutil.ftpupload: Attempt #1. Failed uploading /seasons.css to server.myhost.net. Reason: May 11 17:15:13 localhost wee_reports[17945] ERROR weeutil.ftpupload: Attempt #2. Failed uploading /seasons.css to server.myhost.net. Reason: May 11 17:15:13 localhost wee_reports[17945] ERROR weeutil.ftpupload: Attempt #3. Failed uploading /seasons.css to server.myhost.net. Reason: May 11 17:15:13 localhost wee_reports[17945] ERROR weeutil.ftpupload: Failed to upload file /seasons.css repeats for >60 files May 11 17:15:13 localhost wee_reports[17945] ERROR weeutil.ftpupload: Attempt #1. Failed uploading /monthwind.png to server.myhost.net. Reason: May 11 17:15:13 localhost wee