Set up a PC as a server for receiving files from outside
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
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.
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.
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...
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
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!
#!/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
#!/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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.