LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   How do I make ftp up- and downloads the only thing a restricted user can do? (https://www.linuxquestions.org/questions/linux-security-4/how-do-i-make-ftp-up-and-downloads-the-only-thing-a-restricted-user-can-do-82281/)

jgilels 08-15-2003 11:16 AM

How do I make ftp up- and downloads the only thing a restricted user can do?
 
This requirement is interesting. My client is using Internet Explorer to ftp://[username]@NNN.NNN.NNN.NNN (ip address). When permitted full access, it's a no-brainer and works just as expected.

When there's a restricted shell (bash -r), it doesn't even complete the login. How do I allow him to ftp up and down, but that's IT? Or, is there some other "almost as restricted" way to do this that I haven't seen anyone yet discuss?

trickykid 08-15-2003 12:53 PM

Don't give them a real shell to work with.

When I setup FTP users on my server that I don't want the ability to login in any other way to the machine, I give them a shell of /bin/false as I specified in /etc/shells. This locks them to only using FTP commands to upload and or download from directories they have access to.

Another good idea is if you want to restrict them from browsing any other directories instead of their home and sub directories in their home, you can look into chroot.

jgilels 08-15-2003 01:16 PM

I don't understand what you mean when you say, "as I specified in /etc/shells." I looked there, and added /bin/false. But, then what?

Thanks for the quick feedback.

trickykid 08-15-2003 01:38 PM

After adding /bin/false to /etc/shells, you just specify /bin/false as the users in question default shell, either when creating the user or editing their entry in /etc/passwd


All times are GMT -5. The time now is 05:20 PM.