Jump to content

Hosting directories on server - ftp

- - - - -

  • Please log in to reply
8 replies to this topic

#1
AdrianWierciochPHP

AdrianWierciochPHP

    Learning Programmer

  • Members
  • PipPipPip
  • 54 posts
Hi, I want host a lot of files on my web server (about 1000) and I have their in some directory: "library", how can I host whole directory by terminal (standard ftp client on Ubuntu10.0.4 LTS). If I can not do it, which one client on Ubuntu (prefer non-gui) should I use?

#2
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
  • Location:Vancouver, Eh! Cleverness: 200
Hey Adrian, do you mean set up FTP to access them? ex. ftp://yourdomain.com/library/ ?

You will need to download an FTP server, such as vsftp and allow anonymous login. All installations are different - For most types of installations, this should work:

Log in as root (or use sudo before each command)
1) Grab an FTP server: sudo apt-get install vsftpd
2) Create a file called /etc/vsftpd/vsftpd-anon.conf and place the following contents:
#Listen at FTP port
listen=YES
#Enable local connection
local_enable=NO
#Allow non-account access
anonymous_enable=YES
#Disallow non-account writing
write_enable=NO
#Set FTP serving location
anon_root=/var/ftp
#Other optional configurations!
anon_max_rate=2048000
xferlog_enable=YES
listen_port=21
3) Start vsftp and feed it the new configuration file, use command: vsftpd /etc/vsftpd/vsftpd-anon.conf
4)
- Option A: Create symlink from /var/ftp/library to wherever-your-library-folder-is
ln -s /wherever-your-library-folder-is /var/ftp/library
- Option B: Move entire library folder into /var/ftp/library

Assuming you have no firewall to block port 21, you should be able to browse ftp://yoursite.com/library/ to access the files!
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#3
AdrianWierciochPHP

AdrianWierciochPHP

    Learning Programmer

  • Members
  • PipPipPip
  • 54 posts
Sorry, but mean web-ftp. I have account on Free Web Hosting with PHP, MySQL and cPanel, No Ads and I will insert on it my zend-application which is complexity, has many files so sending each file in server will last vary long time. I want send whole directory by one command. It`s main tree of my application:
quickstart
|-- application
| |-- Bootstrap.php
| |-- configs
| | `-- application.ini
| |-- controllers
| | |-- ErrorController.php
| | `-- IndexController.php
| |-- models
| `-- views
| |-- helpers
| `-- scripts
| |-- error
| | `-- error.phtml
| `-- index
| `-- index.phtml
|-- library(20 directories, 1065 files)
|-- public
| |-- .htaccess
| `-- index.php
`-- tests
|-- application
| `-- bootstrap.php
|-- library
| `-- bootstrap.php
`-- phpunit.xml

How send it to ftp account rapid?

#4
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
  • Location:Vancouver, Eh! Cleverness: 200
Why can you not use your FTP client to drag the folders in (i.e. Filezilla, WinSCP)? It does this whole thing for you, it is the point of a graphical FTP client.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#5
AdrianWierciochPHP

AdrianWierciochPHP

    Learning Programmer

  • Members
  • PipPipPip
  • 54 posts
I will try it. I just thought I can do it by terminal for rapidly transfer...

#6
AdrianWierciochPHP

AdrianWierciochPHP

    Learning Programmer

  • Members
  • PipPipPip
  • 54 posts
I have installed krusader to transfer my file, but it is very slow. My default transfer is about 60kB/s but when I sending file to host it is about 5kB/s
Why is it?

#7
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
  • Location:Vancouver, Eh! Cleverness: 200
I do not know if krusader is that fast, but upload speeds to the host are usually 1/10 the download speed. It may be that your host is not that powerful, try FileZilla.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#8
AdrianWierciochPHP

AdrianWierciochPHP

    Learning Programmer

  • Members
  • PipPipPip
  • 54 posts
I have installed filezilla and have tried it and I`m happy (FileZilla is much better as TotalCMD and Krusader).

Thanks for help :)

#9
7SLEVIN

7SLEVIN

    Newbie

  • Members
  • PipPip
  • 23 posts
Ive heard Midnight Commander (mc) is good, if you prefer a text like interface like Ncurses. Havent got too much experience with it my self, but could be worth to take for a test spin.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users