LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-02-2009, 06:02 AM   #1
NFI
LQ Newbie
 
Registered: Jun 2009
Posts: 13

Rep: Reputation: 0
Set up a PC as a server for receiving files from outside


Hi, thanks very much for all the help I've received on my first post, it's been very helpful.

Now, I've been asked if I can set up a PC -

Intel Quad Core 2.93Ghz with 2 x 1TB HDD in RAID disk mirroring mode, and 8GB RAM

and have external customers be able to login to it to "upload" large files to it - large as in around 200-500MB compressed.

I've read up on creating a file server using Ubuntu , I install a LAMP installation etc thinking this is the right way to go. Am I on the right track?

Any way I do all this and end up with a login screen, so I put my username and password in and it logs in. Then what do I do? What info do I need to set up the Windows based "clients".

Thanks again for any help anyone can give - and advice on stuff like which version of Ubuntu should I use? The logical one to me was Ubuntu 64 bit server, but from what I've read the desktop version does all the same things, just with a more user friendly interface. I'm looking for the quickest way at the moment to sort this problem out, so I can go more in depth when my skill levels with Ubuntu/Linux increases.


EDIT: Sorry, I left out a VERY important piece of the puzzle. We have Bigpond Wireless broadband which has a DYNAMIC DNS. Obviously, I'm going to need a STATIC IP, which Bigpond cannot provide. Is there another way around this?

Last edited by NFI; 07-02-2009 at 06:38 AM.
 
Old 07-02-2009, 06:19 AM   #2
fatra2
Member
 
Registered: Feb 2004
Location: Switzerland
Distribution: Fedora - RedHat - Mandrake - OpenSuse
Posts: 216

Rep: Reputation: 35
Hi there,

Why don't you grant ssh access. One very secure way of transferring files, without any size limitation.

Otherwise, if you don't want to give full write on the machine, why don't you setup an FTP server. Great way of transferring files, in raw data. Therefore, you would have the fastest transfer rate possible. Security wise, I never had any problem with FTP servers.

Cheers
 
Old 07-02-2009, 06:37 AM   #3
NFI
LQ Newbie
 
Registered: Jun 2009
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by fatra2 View Post
Hi there,

Why don't you grant ssh access. One very secure way of transferring files, without any size limitation.

Otherwise, if you don't want to give full write on the machine, why don't you setup an FTP server. Great way of transferring files, in raw data. Therefore, you would have the fastest transfer rate possible. Security wise, I never had any problem with FTP servers.

Cheers
Sorry, I left out a VERY important piece of the puzzle. We have Bigpond Wireless broadband which has a DYNAMIC DNS. Obviously, I'm going to need a STATIC IP, which Bigpond cannot provide.

Very sorry about leaving that out. I'll put it in my original post now.
 
Old 07-02-2009, 06:54 AM   #4
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
Your on the wrong track FTP and similar tools is the way to do it; no need for LAMP. FTPs (as supported by e.g. vsftpd) or sFTP (part of ssh) provide secure communication; I prefer FTPs.

Jail the users to their home directory from an FTP perspective.
They do not need to be able to login with regular accounts as they only have to upload so block normal logins by giving them a shell like /bin/false (not sure what will be available on the distro of your choice).

If your provider can not give you a static IP address, change providers. If that's not possible, look at services like dyndns.
 
Old 07-02-2009, 07:08 AM   #5
NFI
LQ Newbie
 
Registered: Jun 2009
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Wim Sturkenboom View Post
Your on the wrong track FTP and similar tools is the way to do it; no need for LAMP. FTPs (as supported by e.g. vsftpd) or sFTP (part of ssh) provide secure communication; I prefer FTPs.

Jail the users to their home directory from an FTP perspective.
They do not need to be able to login with regular accounts as they only have to upload so block normal logins by giving them a shell like /bin/false (not sure what will be available on the distro of your choice).

If your provider can not give you a static IP address, change providers. If that's not possible, look at services like dyndns.
Thanks Wim, I usually DO tend to look at the hard way first...
 
Old 07-02-2009, 07:38 AM   #6
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
Quote:
Originally Posted by NFI View Post
Sorry, I left out a VERY important piece of the puzzle. We have Bigpond Wireless broadband which has a DYNAMIC DNS. Obviously, I'm going to need a STATIC IP, which Bigpond cannot provide.

Very sorry about leaving that out. I'll put it in my original post now.
I got around that problem by using a dynamic dns server (some of them like the one I'll mention are free as in beer).
http://www.dyndns.com/services/dns/dyndns/
I wrote a script that checks my router's ip address hourly and compares it with the stored value of the ip, if the values are different then I send the new ip to dyndns.

The www.whatismyip.com provides a convenient command that you can embed in your script for this purpose.

It works like a charm at in the worst case I'm out of touch with my server for 1 hour. I can post the script if you would find it useful.
Cheers,
jdk

Last edited by jdkaye; 07-02-2009 at 08:48 AM.
 
Old 07-02-2009, 08:17 AM   #7
NFI
LQ Newbie
 
Registered: Jun 2009
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jdkaye View Post
I got around that problem by using a dynamic dns server (some of them like the one I'll mention are free as in beer).
http://www.dyndns.com/services/dns/dyndns/
I wrote a script that check my router's ip address hourly and compares it with the stored value of the ip, if the values are different then I send the new ip to dyndns.

The www.whatismyip.com provides a convenient command that you can embed in your script for this purpose.

It works like a charm at in the worst case I'm out of touch with my server for 1 hour. I can post the script if you would find it useful.
Cheers,
jdk
Mate, that sounds just like the thing I'm looking for. As I said in my initial post on this site, I don't mind doing the work researching, but if you could post the script or email it to me, that'd be awesome, as it would not only cut down on some research I'd have to do, but would give me some further reference material to learn from in the shorter term. As I have been wondering how if I used something like dyndns etc how I'd update the ip info (I'm familiar with whatismyip.com though). Thanks!

Last edited by NFI; 07-02-2009 at 08:19 AM.
 
Old 07-02-2009, 08:47 AM   #8
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
Sure thing NFI. Here it is:
Code:
#!/bin/bash
tmpfile="/tmp/check_ext_ip"
NEW_EXT_IP=`wget www.whatismyip.com/automation/n09230945.asp -O - -o /dev/null`
if [[ ! -r $tmpfile || ${NEW_EXT_IP} != `cat $tmpfile` ]] ; then
    # replace the next line with the correct ddclient invocation
    /etc/init.d/ddclient
    echo -n $NEW_EXT_IP > $tmpfile
fi
exit 0
As you can see you'll need to install ddclient. You'll need to place this script in /etc/cron.hourly if you want it run hourly and you'll have to configure the ddclient for your particular site and dyndns server.
Cheers,
jdk
 
Old 07-02-2009, 08:21 PM   #9
NFI
LQ Newbie
 
Registered: Jun 2009
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jdkaye View Post
Sure thing NFI. Here it is:
Code:
#!/bin/bash
tmpfile="/tmp/check_ext_ip"
NEW_EXT_IP=`wget www.whatismyip.com/automation/n09230945.asp -O - -o /dev/null`
if [[ ! -r $tmpfile || ${NEW_EXT_IP} != `cat $tmpfile` ]] ; then
    # replace the next line with the correct ddclient invocation
    /etc/init.d/ddclient
    echo -n $NEW_EXT_IP > $tmpfile
fi
exit 0
As you can see you'll need to install ddclient. You'll need to place this script in /etc/cron.hourly if you want it run hourly and you'll have to configure the ddclient for your particular site and dyndns server.
Cheers,
jdk
Thank you very very much jdk!
 
Old 07-03-2009, 12:28 AM   #10
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
My pleasure. Let us know if you got it to work ok.
cheers,
jdk
 
Old 08-15-2009, 08:04 AM   #11
vap16oct1984
Member
 
Registered: Jun 2009
Location: INDIA
Distribution: RHEL-5
Posts: 174
Blog Entries: 3

Rep: Reputation: 38
really great !!! nice job done jdkaye
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
receiving files from others through internet munna_dude Linux - Networking 9 07-16-2007 06:29 AM
Kmail: set SMTP server per "receiving account" acp Linux - Desktop 1 03-13-2007 03:08 PM
Bluetooth Receiving files problem kitying Linux - Wireless Networking 14 03-24-2006 04:12 AM
Receiving files with Kopete in KDE 3.5 hypn0tiq Slackware 2 02-18-2006 07:17 PM
Receiving files via TFTP wswartz Linux - Software 8 09-20-2004 04:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration