Community discussions

MikroTik App
 
awamt
just joined
Topic Author
Posts: 13
Joined: Mon Nov 13, 2006 12:08 pm

FTP Problem

Mon Nov 13, 2006 12:16 pm

Hello,

We are trying to upload some files through ftp. The problem we have is that we can't create new folders using ftp commands (restriction issues). We have tried with WS_FTP and command-line in ms-dos (win).

We saw that other people have the same problem:

http://forum.mikrotik.com//viewtopic.ph ... +directory

We don't want to use drag-and-drop functionality, because we need a batch script in order to connect to MT via FTP and create some folders.

Any ideas?

Thanks in advance,
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26378
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Mon Nov 13, 2006 12:34 pm

the router is not a server. folders are not planned. ftp is only for upgrades
 
User avatar
balimore
Forum Veteran
Forum Veteran
Posts: 884
Joined: Mon Apr 10, 2006 3:38 am

Mon Nov 13, 2006 12:55 pm

the router is not a server. folders are not planned. ftp is only for upgrades
---
oh.. i see
realy.... i never try to make folder to routing system. i don't want cause any files complicated with system files. and i must keep clean it

yes. normally all my files keep in APPLE server. and central remote logs in windows for all my RBs and x86-router.
again i love clean on routing system. this's my suggestion.

thanks n@rmis good for your suggestion.. :wink:
regards
Hasbullah.com
---
 
awamt
just joined
Topic Author
Posts: 13
Joined: Mon Nov 13, 2006 12:08 pm

massive update advice

Mon Nov 13, 2006 1:29 pm

Hi again and thank you for your quick replies,

Assuming we can´t use mikrotik as a server we would like to figure out something to massively update or change the welcome webpage of the huge amount of hotspots that we have spread in our network. That is actually the reason because we were interesting on using batch code plus ftp commands.

We know some other systems are able to host their welcome webpages on remote but we don't think that is the case of mikrotik.

Regards.
 
awamt
just joined
Topic Author
Posts: 13
Joined: Mon Nov 13, 2006 12:08 pm

Wed Nov 15, 2006 2:03 pm

Please anybody could give us an idea to massively update the hotspot pages?

Thanks!
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26378
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Wed Nov 15, 2006 2:05 pm

you would have to set the `html directory` parameter on all of the routers, then the directories would be automatically created. then your FTP batch job would work.
 
awamt
just joined
Topic Author
Posts: 13
Joined: Mon Nov 13, 2006 12:08 pm

Wed Nov 15, 2006 2:34 pm

Yes, I create the Hotspot and with the subfolders are created automatically. The problem is that the ftp batch job can't create subfolders inside that one.

I will explain the entire process:

- Create and setup the hotspot with default parameters. Ok, I have the "hotspot" folder now.

- I use drad-and-drop and create another folder, "akiwifi".

- I change the "html directory" parameter to link to the new folder ("akiwifi").

Now I want to update the akiwifi folder via ftp batch job, but the problem is that it can't create subfolders inside "akiwifi". I do can create files, but not folders.

Thank you for your help. Best regards, AWA.
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26378
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Wed Nov 15, 2006 2:47 pm

you should make a webpage that doesn't use subfolders. hotspot login pages are a simple thing, why do you need subfolders for them?
 
awamt
just joined
Topic Author
Posts: 13
Joined: Mon Nov 13, 2006 12:08 pm

Wed Nov 15, 2006 2:55 pm

Yes, we know that could be a solution...but there isn't any alternative?? We use the same structure that the default folder created by the MT... Doesn't make sense we have to do a non-folder webpage.

I paste the problem here:

C:\Documents and Settings\NOC\Escritorio>ftp 192.168.6.2
Conectado a 192.168.6.2.
220 MT1 FTP server (MikroTik 2.9.24) ready
Usuario (192.168.6.2:(none)): admin
331 Password required for admin
Contraseña:
230 User admin logged in
ftp> dir
200 PORT command successful
150 Opening data connection
drw-rw---- 1 root root 2048 Jan 2 01:01 as
drw-rw---- 1 root root 2048 Jan 1 00:04 hotspot
226 Transfer complete
ftp: 123 bytes recibidos en 0,05 segundos 2,62 a KB/s.
ftp> mkdir d
500 'XMKD': command not understood
ftp> cd hotspot
250 CWD command successful
ftp> mkdir ejemplo
500 'XMKD': command not understood
ftp>

Thanks again, AWA
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26378
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Wed Nov 15, 2006 3:00 pm

I still don't understand the problem :)

the RouterOS creates all the folder structure for you, you just need to upload the files to the made directories, why do you need to make your own?

Basically this is about editing or replacing existing files, you should not have the need for subfolders
 
awamt
just joined
Topic Author
Posts: 13
Joined: Mon Nov 13, 2006 12:08 pm

Wed Nov 15, 2006 3:06 pm

The webpage that we need to upload doesn't have the same structure and it has more folders than the old webpage, so we need to create new ones.
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26378
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Wed Nov 15, 2006 3:09 pm

you have to use only the same files as RouterOS creates in the HTML-Directory. You will not be able to use different file structure. This is all about `modification of existing pages`.
 
awamt
just joined
Topic Author
Posts: 13
Joined: Mon Nov 13, 2006 12:08 pm

Wed Nov 15, 2006 3:26 pm

Ok normis, thank you very much.

We will try to update the files in the existing structure.

I will post again with the results.

Thanks for your help
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26378
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Wed Nov 15, 2006 3:47 pm

actually, it seems that windows command line ftp client is at fault. making directories works with any `normal` ftp client. the error that you received means that windows uses ftp mkdir command according to specifications from 1980 (google it up and you will see :)
 
awamt
just joined
Topic Author
Posts: 13
Joined: Mon Nov 13, 2006 12:08 pm

Wed Nov 15, 2006 4:01 pm

Yes, that's right. We noticed that we can create directories by another way: using direct FTP commands, not using a client:

telnet 192.168.6.2 21
USER admin
PASS
MKD hola

This works!! We can't send files this way, but we can create directories. The process will be:

1.- Create necessary directories via telnet 192.168.6.2 21
2.- Transfer files via ftp client

Thanks everyone! AWA
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26378
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Wed Nov 15, 2006 4:04 pm

it also works from linux/unix/macos command line, so maybe you should just choose a better operating system for this task :)
 
awamt
just joined
Topic Author
Posts: 13
Joined: Mon Nov 13, 2006 12:08 pm

Wed Nov 15, 2006 4:16 pm

That simplifies the solution, thank you very much for your help!

AWA
 
BDISP
newbie
Posts: 35
Joined: Thu Feb 19, 2009 1:24 pm

Re: FTP Problem

Wed Mar 18, 2009 10:48 pm

user admin
331 Password required for admin
pass 230 User admin logged in

MKD files
550 files: Input/output error



how can i creat dir ?

Who is online

Users browsing this forum: 4l4R1, Zipter47 and 86 guests