1851082 Members
3451 Online
104056 Solutions
New Discussion

Re: FTP access only.

 
Greg Dick_1
Occasional Advisor

FTP access only.

Is there a way to set it so certain accounts can ftp in only?

T.I.A.
Greg
6 REPLIES 6
Christopher Caldwell
Honored Contributor

Re: FTP access only.

Add /bin/false to /etc/shells
Make the user's shell /bin/false
Philip Chan_1
Respected Contributor

Re: FTP access only.


I guess Chris really mean /etc/passwd instead of /etc/shells. Chris, am I right on this?

~Philip
Printaporn_1
Esteemed Contributor

Re: FTP access only.

Hi Greg,

One easy method is goto sam -> networking and communication -> network service

enable anonymous FTP then you will have
Anon FTP Deposit Enabled Public account file deposit directory ^
| Anon FTP Retrieval Enabled Public account file retrieval directory
| Bootp Disabled Boot Protocol Server
then you can disable FTP retrieval and lot od choice.

Regards,
enjoy any little thing in my life
Patrick Wallek
Honored Contributor

Re: FTP access only.

You could use the /bin/false method. Make the users shell in /etc/passwd /bin/false and then make sure that /bin/false is in the /etc/shells file so that the user can connect via ftp. Remember that /etc/shells controls which shells ftp allows to log in. If the users shell is not in /etc/shells then that user will not be able to log in.
federico_3
Honored Contributor

Re: FTP access only.

A simple method cuold be the following:

Insert in the user .profile an "exit" command
.This way the user will be able to do ftp but not login.

Federico
Thierry Poels_1
Honored Contributor

Re: FTP access only.

Hi,
I would prefer the /bin/false option, or even better a link to /bin/false (e.g. /bin/onlyFTP) so that users who already have /bin/false as login shell don't get FTP access.

Adding an exit-command in their .profile or .login is not recommended however: as FTP access is granted they are able to FTP another .profile or .login!

regards,
Thierry Poels.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.