ftp automation

ScriptFTP

The professional tool to automate FTP, SFTP, FTPS and schedule FTP batch jobs

The forum is now read only. Please, go to the the main ScriptFTP website if you need help.
Post here if you experience file transfer problems or unexpected errors.
Hi.

When syncronising files from my PC to an external NAS HD, the program get confused regarding dot-files. Even that the files are present remote, the files are uploadet again. Se the picture from my log underneath. So, is this a bug or what?

Lars H.
Attachments
dotfiles.gif
dotfiles.gif (5.66KiB)Viewed 4273 times
Hi Lars,

Send me the complete output activating the verbose mode (put VERBOSE(ON) on the top of your script file). I also use SYNC to upload files to scriptftp.com and the .htaccess file always sinchronized fine.
Hi.

I just sent you an e-mail with a log and the script I used.

Lars H.
Hello Lars,

I'm still unable to reproduce the error here. It worked fine... Please, download a new build of ScriptFTP I made that shows the file modification times:

http://www.ScriptFTP.com/ScriptFTP_devel_setup.exe

And send me the output with verbose mode activated.
Hi.

Forgot my problem? I sent you a log an now I just sent a new one.

Lars H.
Hi Lars,

I haven't forgotten it ;) , just waiting for your log as I am unable to get the same
the error here.

In the log file, the files being sinchronized are two jpgs and a .htpasswd file (not .htaccess). But I guess it does not matter, the problem is the same.

It seems that ScriptFTP is uploading again and again the .htpasswd file because it was not listed in the file listing provided by the FTP server to ScriptFTP (ScriptFTP thinks that the file does not exist in
the server). For checking that, please replace the SYNC command with the following chunk:
Code: Select allCHDIR("/dot_files") GETLIST($list,REMOTE_FILES) PRINT($list)
And send me the result.
Hi.

Here the output from the GETLIST:
Code: Select allCHDIR("/dot_files") Changing current remote directory to /dot_files CWD /dot_files 250 OK. Current directory is /dot_files PWD 257 "/dot_files" is your current location GETLIST(REMOTE_FILES) Getting file listing of current remote directory TYPE I 200 TYPE is now 8-bit binary PASV 227 Entering Passive Mode (192,168,1,5,150,154) Opening data connection to 192.168.1.5 Port: 38554 MLSD 150 Accepted data connection 224 bytes transferred. (N/A/s) (0 ms) 226-ASCII 226-Options: -l 226 2 matches total Found 2 files. |eos_oversikt.jpg|ixus_big.jpg  
Your right, no dot-file in the listing! But it IS pressent.

I also testet to a server hosting my homepages extern, and the GETLIST didn't find the dot-file there either.

Lars H.
Hello Lars,

I'm a bit mad about this problem because the logs you sent me shows that your FTP server behaves as the dot files do not exist at all.

I've even tested ScriptFTP against a Linux installation of Pure-FTPd (The FTP server running on your 192.168.1.5 as your log shows) and I get the dot files working as expected. I've also tried it with
FileZilla and others with the same results.

Some thoughts:

I think that the only possibility to address this error is to create me a temporary FTP account in your web server and let me do the test.

But this error must be very rare... I have no other bug report about this issue. I'm lost, sorry Lars.
Hey Lars,

I found something. Look at this on your log:
Code: Select all150 Accepted data connection 224 bytes transferred. (N/A/s) (0 ms) 226-ASCII 226-Options: -l 226 2 matches total
The messages that start with a number are FTP server responses. This means that are the messages exactly (byte by byte) sent from the FTP server to ScriptFTP. And it says:
Code: Select all226 2 matches total.
That should be 3, the 2 jpgs and the .htpassswd. The server is plain wrong.

And ScriptFTP is not using a wildcard or anything else, just requesting a file listing using the FTP protocol MLSD command.
Hi.

Is it possible that my Pure-FTPd is set with a -x and -X switch according to this text I found by some googling?
* How to restrict access to dot files ?

-> Is there an option to prevent people from accessing "." files/dirs (such
as .bash_history, .profile, .ssh ...) EVEN if they are owned by the user ?

Yes. '-x' (--prohibitdotfileswrite) denies write/delete/chmod/rename of
dot-files, even if they are owned by the user. They can be listed, though,
because security through obscurity is dumb and software shouldn't lie to
you. But users can't change the content of these files.

Alternatively, you can use '-X' (--prohibitdotfilesread) to also prevent
users from READING these files and going into directories that begin with
"." .
I don't see how I can remove the -x and -X switch (if existing) in my Pure-FTPd and set the switches '-d' -- displaydotfiles and '-z' allowdotfiles which I don't have any access to do.

Is it possible that this could be overuled by setting a switch to the MLSD command like MLSD -a or MLSD -al in your script? If not, I think I have to live with this problem. At least the dot-files are uploaded to my backup, but too often.

By the way, I'm now able to see the dot-files from WSftp Pro by setting the filter '-al' for remote dirs in 'Options'.

Lars H.
Hi Lars,
Yes. '-x' (--prohibitdotfileswrite) denies write/delete/chmod/rename of
dot-files, even if they are owned by the user. They can be listed, though,
because security through obscurity is dumb and software shouldn't lie to
you. But users can't change the content of these files.
The text you pasted refers to forbidding the read/write access to dot files. Not their listing. Take a look at this link:

http://rackerhacker.com/2007/05/16/show ... n-proftpd/

It seems that you have to add "ListOptions -a" to the file proftpd.com under the /etc directory. But as you are using a NAS (with embebed linux I guess) and a third party webserver you will probably cannot change that file.
Is it possible that this could be overuled by setting a switch to the MLSD command like MLSD -a or MLSD -al in your script?
Mmmmm... There is no switch for that, sorry, and I'm a bit reluctant to create it. ScriptFTP command set has to find a compromise between features and ease. This case is very rare... If the FTP server administrator has decided, for any reason, to hide dot files I think that ScriptFTP should follow that rule.

But I'll modify ScriptFTP and send you a customized build tomorrow. It seems to be very easy to add this change to how MLSD is invoked.
Hi again Lars,

Download a setup file called ScriptFTP_3_1_setup_lars.exe from this folder:

http://www.ScriptFTP.com/Attic/

This custom build uses the -a option when requesting file listings.
This custom build uses the -a option when requesting file listings.
Huummm? My log show a -l option for the MLSD command.

But never the less, this is not a great problem. If dot-files are uploaded even if they are not changed, - I can live with that. So don't spell your energy on my problem, I'll for sure come up with other problems.

But so far: ScriptFTB is the best backup-program ever!

Lars H.
Thanks Lars :D