Uploading files to web server.

The place to post if you need help or advice

Moderators: ChrisThornett, LXF moderators

Uploading files to web server.

Postby mikejd » Mon May 30, 2005 2:24 pm

I have a networked web server set up with Apache which I am going to use for testing web sites. I can access the web pages via port 80 over the network, at the moment only the default index.html file is available in /var/www/html.
What is the best way to upload files? Can I set up ftp and if so how do I do it? Assistance or pointer to good reference appreciated.

Regards,
Mike Davies
mikejd
LXF regular
 
Posts: 134
Joined: Fri Apr 08, 2005 4:46 pm
Location: Huntly, Aberdeenshire

RE: Uploading files to web server.

Postby mattohope » Tue May 31, 2005 2:51 pm

Hi,

I would say the best way would be via FTP, which Linux distribution are you running? this'll help to determin how to activate the FTP service.

Matt
mattohope
 
Posts: 4
Joined: Tue May 31, 2005 2:20 pm

RE: Uploading files to web server.

Postby mikejd » Wed Jun 01, 2005 10:09 am

Matt,
I am running Mandrake 9.1. When I installed I thought I incuded the packages for ftp server but not certain.
I seem to have the following packages installed :
ftp-client-krbs, gftp, lftp, proftp

rpmdrake shows packages which can be installed :
ftp-server-krbs, ncftp, proftpd-anonymous, tftp, tftp-server, vsftpd

Do I need to install the ftp-server package?

Thanks for any assistance, Mike
mikejd
LXF regular
 
Posts: 134
Joined: Fri Apr 08, 2005 4:46 pm
Location: Huntly, Aberdeenshire

RE: Uploading files to web server.

Postby mattohope » Wed Jun 01, 2005 11:09 am

Hi Mike,

I would personally install the vsfpd package, its the ftp server that we run on all our Linux servers at work and the one I use on my personal Linux PC's. Once installed and started the service will authenticate system users. For example if you have a linux user called admin, you can ftp to the server using admin's username and password.

Matt
mattohope
 
Posts: 4
Joined: Tue May 31, 2005 2:20 pm

RE: Uploading files to web server.

Postby mikejd » Wed Jun 01, 2005 3:52 pm

Thanks Matt.
I have installed vsftp. It appears to be working. If I use gftp to connect to 192.168.0.3 port 21 it connects then immediately disconnects, if I connect to port 80 it stays connected but nothing shows.

Can you suggest a good reference to setting vsftp up to upload web pages to /var/ww/html/. I have Googled and found several links but they don't make a lot of sense in this respect.

Thanks again,
Mike
mikejd
LXF regular
 
Posts: 134
Joined: Fri Apr 08, 2005 4:46 pm
Location: Huntly, Aberdeenshire

RE: Uploading files to web server.

Postby davecs » Wed Jun 01, 2005 4:04 pm

I know nothing about local networks, but recently discovered that Konqueror is an excellent ftp agent. Just point konqueror to the target ftp address, it will ask for user name and password, and it will look just like it is in File Manager mode. All you need to do is open a local Konqueror in File Manager mode (ie click Home and navigate) and drag and drop files across. Easy.
Image
Asus Asus M2N32 WS Pro+Athlon AM2/4200+ — GeForce 7600GT — 2Gb Cosair VS RAM — 500Gb WD5000AAKS SATA Drive — PCLinuxOS
User avatar
davecs
LXF regular
 
Posts: 530
Joined: Sat Apr 09, 2005 11:13 pm
Location: Dagenham, Essex

RE: Uploading files to web server.

Postby nelz » Wed Jun 01, 2005 5:47 pm

Even better, select Window -> Split View and you can have a dual pane window with the local directory in one and the FTP site in the other.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8577
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Re: RE: Uploading files to web server.

Postby davecs » Wed Jun 01, 2005 6:59 pm

nelz wrote:Even better, select Window -> Split View and you can have a dual pane window with the local directory in one and the FTP site in the other.

Blimey!

The sheer power of Konqueror just never ceases to amaze me. I just wish they could sort out one or two of the basics (eg if you have two copies open, one File Manager and one Browser, and you click on a Web Link in KMail, that it should automatically add the new tab to the browser, and not the File Manager!! - Nelz, if you could give me the answer to that one and make me look like a complete n00b again, I would be grateful!)
Image
Asus Asus M2N32 WS Pro+Athlon AM2/4200+ — GeForce 7600GT — 2Gb Cosair VS RAM — 500Gb WD5000AAKS SATA Drive — PCLinuxOS
User avatar
davecs
LXF regular
 
Posts: 530
Joined: Sat Apr 09, 2005 11:13 pm
Location: Dagenham, Essex

RE: Re: RE: Uploading files to web server.

Postby nelz » Wed Jun 01, 2005 9:21 pm

I wish I knew the answer to that one, I keep getting bitten by it. It appears that when you open a new link, KDE always opens it in the first instance of Konqueror. I usually end up opening a new Konqueror window (or a tab on the existing browser window) and dragging the favicon across.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8577
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

RE: Re: RE: Uploading files to web server.

Postby skecs » Sun Jun 12, 2005 6:19 am

Hi Mike,

Which user are you trying to login as when using gFTP? If you are trying to access the "root" account vsftp will disconnect immediately. It is part of the "very secure" bit! It also locks users into their home directories not allowing access to other parts of the system. To change this either edit /etc/vsftpd.conf which is well commented (not recommended) or an easier way is to change the owner of /srv/www/htdocs or whatever your Document Root is in httpd.conf (depending on your Apache version something like /etc/httpd/httpd.conf or /etc/apache2/httpd.conf) to the user that manages the default web account. Then just do a "mv /srv/www/htdocs /srv/www/htdocs-old" and "mkdir /srv/www/htdocs" then change the user's home to /srv/www/htdocs.
Regards from
Downunder!
.... _
... (0)>
... / /\
.. / / .)
.. V_/_
Linux Powered!
User avatar
skecs
 
Posts: 76
Joined: Fri Apr 22, 2005 9:22 am
Location: Bathurst, NSW Australia

Postby M0PHP » Sun Jun 12, 2005 10:38 am

I prefer to use samba to upload files to my local webserver. In linux or windows clients I can mount the samba share as a local folder and simply work from that directly - I don't have to save it on the harddisk, open up ftp client and then transfer it.
User avatar
M0PHP
LXF regular
 
Posts: 737
Joined: Wed Apr 06, 2005 7:40 am
Location: Bishop Auckland, County Durham, UK

Postby youlikeicecream » Mon Jun 13, 2005 5:48 am

I was gonna say, if it is a local networked server, just create a shared folder with samba and upload accross the network.

if it is a remote system, you would have to use ftp.

looks like MOPHP had the same idea too :)

Mike :)
youlikeicecream
LXF regular
 
Posts: 721
Joined: Fri Jun 03, 2005 11:40 am
Location: Oxford

Postby Guest » Mon Jun 13, 2005 3:36 pm

you can also use scp to copy files but this requires that ssh be running
i use this to copy files across webservers that are in different datacenters as it is secure since it uses ssh.
Guest
 

Postby bigbee » Mon Jun 13, 2005 6:29 pm

or you can mount your drive as an NFS drive, which allow you to use your remote drive like a local directory
Image
User avatar
bigbee
 
Posts: 55
Joined: Thu Jun 09, 2005 2:46 pm
Location: Westerlo, Belgium


Return to Help!

Who is online

Users browsing this forum: No registered users and 0 guests