Dave's Brain

Browse - computer tips - linux ftp only account

Date: 2010may28
OS: Linux

Q.  How can I restrict an account to ftp only?

A.  Make file /usr/local/bin/ftponly that contains:

	#!/bin/sh
	echo "Only FTP access is allowed with this account."
	exit 0

and make it executable:

	chmod a+x /usr/local/bin/ftponly

Then make it the user's shell:

	chsh -s /usr/local/bin/ftponly <user>

Test it:
	Try to login to this account with ssh
What this info useful to you? You can donate to say thanks

Add a comment

Sign in to add a comment
Copyright © 2008-2012, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.
Advertisements: