Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / Restricting FTP

Author
Message
AlexI
19
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 8th Nov 2006 21:04
I have got a filezilla FTP server running, how can i stop some users from being allowed to upload certain file types?
Thanks,
Alex


adr
21
Years of Service
User Offline
Joined: 21st May 2003
Location: Job Centre
Posted: 8th Nov 2006 22:05 Edited at: 8th Nov 2006 22:06
Two questions:
1. Why does it matter if people upload certain files? Even if someone uploads a virus, the FTP Server won't automatically execute and install it. You would have to do that. If it's a public FTP and you want to make sure no-one else can download malicious files, then a simple solution would be to cron a virus check every 5 minutes or so, deleting suspect files.

2. Seriously ... have you heard of google? Or, as geecee3 suggested, are you just gunning for the 2,000,000th thread?


I'm superfly TNT
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 9th Nov 2006 00:35
sudo pico crontab

Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 9th Nov 2006 10:13
indi - based on linux I've used, not only is that irrelevant here, it wont work either. On Fedora, crontab is its own editor (based on vi I think). To edit Cron, I do:
$ crontab -e
or
$ sudo crontab -e

depending on if I want to edit my own or root's crontab.

However, I'm guessing that wasn't a serious suggestion

[center]
Kentaree
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 9th Nov 2006 11:42
Nick: technically, indi is right in a way that crontab does use a file which can be edited, the -e parameter just opens up whatever you have set as your default editor ($EDIT iirc) and opens the file up But indeed, it has no significance to this thread.

indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 9th Nov 2006 12:23
works on OSX just fine mate. I have crontabs that speak the actions to me, dunno about your variant of linux.

Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 9th Nov 2006 12:23
Quote: "technically, indi is right in a way that crontab does use a file which can be edited"


Very true - I mis-worded my post. I, however, didn't know you could change the default editor! I really prefer pico/nano to vi!

[center]
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 9th Nov 2006 13:03
it relates to what adr was saying. perhaps reading the whole post might help.

Zappo
Valued Member
20
Years of Service
User Offline
Joined: 27th Oct 2004
Location: In the post
Posted: 9th Nov 2006 13:11
Many flavours of Linux do recommend using the -e parameter as it automatically knows which crontab file to edit, creates one if it doesn't already exist for the current user, and installs the changes when you save and quit (if the systems needs something special doing to it to recognise the new crontab file).

I have a feeling that individual user crontabs need to be edited in this way so the system installs them when you finish editing. The roots crontab file on the other hand can be edited manually.

You can change the default editor it uses by setting the EDITOR environment variable.
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 9th Nov 2006 13:24
Quote: "it relates to what adr was saying. perhaps reading the whole post might help."

Hehe - oops! I did read it but must have missed that bit (he says, trying to dodge a bullet that's already hit)

[center]
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 9th Nov 2006 13:41
bullet time! matrixocity

AlexI
19
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 9th Nov 2006 18:30
I think ill use my other PC as a server as it is already running a NFTS file system more secure

I think ill just make a dark basic program that runs in the background and deletes any files with certain extensions that way i can program it exactly how i want it


Chris Franklin
19
Years of Service
User Offline
Joined: 2nd Aug 2005
Location: UK
Posted: 9th Nov 2006 18:39 Edited at: 9th Nov 2006 18:44
Quote: "I think ill just make a dark basic program that runs in the background and deletes any files with certain extensions that way i can program it exactly how i want it"

way to go on ram killing


Edit:If you DON'T know how to do this your really really not ready to make a host no offence but hostings IS alot harder than it sounds just put the idea behind you for now all these new thread's is getting annoying to (No offence intended)

Edit 2: 5 threads on 2 pages | 4 on this page and 1 very top of page 2

Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 9th Nov 2006 18:51
if you REALLY REALLY want an FTP server, dont use windows.. use linux. Spend a little while learning how... Summary:
Create a user or users
Install vsftp (if using redhat, run this as root: yum install vsftpd)
Configure vsftpd (setup the user_list and chroot_list if needed)
Setup a cron job to remove all files with an extension (for example, enter this into roots crontab...
This will recursively remove anything ending in .exe every 5 minutes. You could just do "* * * * *" (ie no /5) and it'd do it every minute. Bare in mind this does not stop people uploading an EXE by any other name (eg renaming it to a .doc).

That's the VERY basics.

[center]
Me!
19
Years of Service
User Offline
Joined: 26th Jul 2005
Location:
Posted: 9th Nov 2006 19:34
NTFS file system and secure have what in common?

if you are running NTFS then you are running winderz NT or XP for a guess, so automaticaly you are insecure, don`t try running a server from winderz unless you are VERY knowledgable, theres a lot of possible traps for the unwary, Just use Linux as suggested above, just make sure you check for server updates and use decent (that means 16 characters or more and multi-case) passwords for users and root (no...not "password" or "secret" something random with no words in it is best)



Dr Frankenstiens mum told him to make some new friends, not knowing where this was going to lead.
AlexI
19
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 9th Nov 2006 20:30
Quote: "NTFS file system and secure have what in common? "
you can set lots of permissions on files


David R
21
Years of Service
User Offline
Joined: 9th Sep 2003
Location: 3.14
Posted: 9th Nov 2006 20:47
Quote: "automaticaly you are insecure, don`t try running a server from winderz unless you are VERY knowledgable"


That's the n00bie-ist thing I have ever heard. Unless you are running a pre-SP2 box with auto updates turned off, you should be relatively safe.

If anything, Linux is worse when it comes to the "unless you are VERY knowledgable" comment; Windows is (in general) easier to understand the fundamentals of than Linux; I know I'm making generalisations here, but it is basically true.

Although Windows hides a lot of low-level stuff from you, you do need to understand a lot more about Linux to ensure you are secure in my experience - because there is a lot of low-level stuff you wouldn't normally tinker with in Windows, that tend to have rather insecure default settings

Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 9th Nov 2006 20:49 Edited at: 9th Nov 2006 20:52
[rant]


Quote: "you can set lots of permissions on files"

Which, although more secure, means bugger all if the operating system itself is about as secure as a standard garden shed.

In all fairness, a poorly setup linux server is just as secure as a poorly setup windows server, just as a properly setup server is usually pretty secure no matter what the OS.

The problem is - and there is no offence intended at all here - that you know bugger all about servers and hosting. You seem to be under the impression that because NTFS is more secure than FAT32 then you'll be fine - not true. You seem to be under the impression that hosting companies rip you off and that you can do just as good a job at home on ADSL. Not true.

I've said it before and i've said it again - you're running before you can walk.

If you're in anyway interested in servers - start learning linux. There are LOADS of windows server's out there but (generally speaking) people get windows servers for a few reasons:
1) They find terminals scary and would much rather use a point and click interface. This imho is a stupid reason - but a valid one if you cant afford training.
2) They NEED to use windows - eg a .NET server application or they HAVE to use Microsoft Exchange 2003.
3) They're lazy and cant be arsed to learn Linux.

Windows is a great operating system if you are not sure what you're doing - its been idiot proofed to a degree (you can still break it, but it usually asks if you're sure).

Linux, imho, is a better server OS as its more stable, better at memory management and, if correctly setup, is usually more secure.

That doesn't mean people CANT hack it. They just usually cant be bothered because its usually far easier to hack a windows machine - usually because the user is an idiot and leaves the admin user with no password set (recalls the UK "hacker" who got done in by the americans when he managed to gain access to secured US government computers by leaving the admin password blank and clicking login - or something like that).

So - you have a choice...
1) Use windows and live happily ever after in a fairly crap server OS
2) Actually put some effort in on your side and LEARN linux. This involves using a thing called a search engine or a "book". Yeah, yeah... Book is stupid... blah blah... But it could be the only way.

People on this forum will probably continue to help - but I doubt any here are certified linux specialists (please correct me if I'm wrong and add me to your Skype!!). They can only offer advice from limited experience.

[/rant]

EDIT:
Quote: "That's the n00bie-ist thing I have ever heard. Unless you are running a pre-SP2 box with auto updates turned off, you should be relatively safe."


imho - thats the "n00bie-ist" thing I've ever heard (shouldn't it be noobie-est... ist implies you're against n00bs in a kind of racist type way! lol (JOKE!))

[center]
David R
21
Years of Service
User Offline
Joined: 9th Sep 2003
Location: 3.14
Posted: 9th Nov 2006 20:54
Quote: "imho - thats the "n00bie-ist" thing I've ever heard "


Give me ten security vulnerabilities in Windows/Windows Server that can be exploited, and then show me that the Linux kernel and the Apache server have absolutely none, and then your comment will be valid.

Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 9th Nov 2006 21:12 Edited at: 9th Nov 2006 21:13
Quote: "Give me ten security vulnerabilities in Windows/Windows Server that can be exploited, and then show me that the Linux kernel and the Apache server have absolutely none, and then your comment will be valid."

I'm not a security expert...

The reason I think its a "n00bie" statement (I hate that tag...) is that - generally speaking - someone who choses to run a windows server because they dont know linux is not going to have the sense to set the server up correctly.
SP2 and Auto-updates on or not, they probably dont even know what a service is and how to disable it. They'd probably leave the Admin password blank for convinience if they weren't told otherwise....

Like I said - its a generalisation. There are people out there who know a HELL of a lot about a windows server - and as I said above, those people will make a better server out of windows than an idiot will with linux anyday.

Equally - an idiot on linux can make a server just as insecure - although, AFAIK, linux wont let you leave the root password blank.

The other thing to bear in mind - as I said above - is that hackers will target windows as there is a large audience. If you're gonna risk life inprosonment - why bother doing it for a small percentage? There is a much larger community of stupid windows users than there are stupid linux users. Therefore people WILL and DO make more virii for Windows (and thus exploits).

I apologise if I offended you - but your statement was a little too pro-ms-server for me. In my opinion - windows is far less secure than linux.

EDIT: FYI, this is an interesting read... http://www.sans.org/top20/

[center]
David R
21
Years of Service
User Offline
Joined: 9th Sep 2003
Location: 3.14
Posted: 9th Nov 2006 21:23
What was addressing with the "n00bie" thing was the constant "OMG WINDOWS IS TEH SUX0RZ LINUX ROX TEH BIG! LOLORZ 1111" type thing.

Quote: "Like I said - its a generalisation."

This is precisely what I said also

Quote: "There is a much larger community of stupid windows users than there are stupid linux users"


This was actually my point. Fine, there are going to be lots of stupid Windows users. BUT: If the stupid Windows user exchanges their Windows box for a Linux box, there is logically going to be more security vulnerabilities possible than in a Windows box, because the user does not understand the lower-levels of Linux which need to be configured; whereas Windows does not. So if anything, they are just as insecure as each other in the hands of a stupid user - which is what you pointed out, and what I tried to pick up on (but I obviously didn't elaborate enough to make my point clear)

Quote: "but your statement was a little too pro-ms-server for me."

Nah, I'm definitely not an MS elitist, in fact I hate their guts. What I was trying to say was the above - that swapping a Windows box for a Linux box is going to be no more secure if you don't understand the Linux box

Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 10th Nov 2006 01:09
@David - ahh fair enough. Seems we crossed our signals somehow. Seems we were both trying to say the same thing with different words

I see your point about a linux box being "capable" or more security holes when put in the hands of a novice, but in terms of quality of software, Linux does have a pretty good security grounding to start with compared to the way windows works. The only thing I prefer about Windows is that (afaik) you can assign multiple users and groups with different permissions to any given file or folder (when using NTFS), whereas with linux you're limited to and owner, group and guest. I could be wrong though...

[center]
Jeku
Moderator
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Vancouver, British Columbia, Canada
Posted: 10th Nov 2006 04:10
Yah, Linux is NOT secure by default. That is a myth.

indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 10th Nov 2006 04:23
I use a variant of BSD unix as your well aware.

Steve J
18
Years of Service
User Offline
Joined: 22nd Apr 2006
Location: Vancouver, Washington
Posted: 10th Nov 2006 05:03 Edited at: 10th Nov 2006 05:04
MacOSX Hi, really, you are asking waaay to much.

http://phoenixophelia.com

Steve J, less, and less Controversial!
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 10th Nov 2006 05:28
if you spend the time looking on the net you might find a great tutorial.

perhaps this will solve your problems. ie fedora

http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch15_:_Linux_FTP_Server_Setup

Zappo
Valued Member
20
Years of Service
User Offline
Joined: 27th Oct 2004
Location: In the post
Posted: 10th Nov 2006 14:50
Quote: " Yah, Linux is NOT secure by default. That is a myth."

There are hardened versions straight out of the box (so to speak). Several I know of give you options when you install as to how secure you want to make the server. Most now-a-days also go and fetch updates too during the install process so they are bang up to date when you have finished.
On the other hand, I have heard of boxes being hacked while they were being installed, but that was because people gave them outside IP addresses from the offset in organisations which get scanned continuously.
Kentaree
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 10th Nov 2006 16:19
Fedora/Redhat is pretty secure because they use SELinux by default. Linux is also more secure than windows be default because of its access rights system, unless the hacker manages to get root access, in which case you're royally screwed

Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 10th Nov 2006 17:22
Quote: "SELinux by default"

Which is just plain annoying

[center]
Zappo
Valued Member
20
Years of Service
User Offline
Joined: 27th Oct 2004
Location: In the post
Posted: 10th Nov 2006 18:02
Quote: "Which is just plain annoying"

Ha! I guess thats the trick - trying to balance security with ease of administration. The tougher you make the box, the harder it is to use.

Login to post a reply

Server time is: 2024-11-17 20:24:04
Your offset time is: 2024-11-17 20:24:04