LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to setup FTP users only users on LInux Fedora (http://www.linuxquestions.org/questions/linux-newbie-8/how-to-setup-ftp-users-only-users-on-linux-fedora-171843/)

Soujiro 04-18-2004 09:23 PM

How to setup FTP users only users on LInux Fedora
 
Ok, i have linux Fedora and i'm connected to it via SSH. I just got linux and the dedicated box a couple days ago. I want to know, how i can add FTP only users. I want these ftp users to access only a specific folder and nothing else. I want these users to have a username and passwd that i assign them. How do i do this? And remember, i'm a noob, i dont know ANY techincal info and nothing about linux.

Thanks,
Chris

adamwenner 05-01-2004 02:58 PM

ok, heres what you want to do

if you only want users to be able to access their own things,

use

useradd username -d pathtofiles

-d pathtofiles will specify that their home directory will be whereever you want their files to go

if you are running a webserver with default apache settings, you most likely will want their files to go onto

/var/www/html/foldername/

if u need more info, lemme know

btmiller 05-01-2004 04:07 PM

Also, you can assign them a shell like /bin/true so that they can't login to a shell (only to FTP). You'll have to make sure that this shell is listed in /etc/shells or the FTP server won't let them log in. If you're using WU-FTPD as your FTP server you can also use the restricted-uid directive in your /etc/ftpaccess file to restrict user do they can't change to a directory outside of your home directory (normally nonanonymous FTP users can transverse the system directory tree, but if permissions are set correctly of course they can't write anywhere outside of their own directory [or anywhere else you've given them access to]).

adamwenner 05-01-2004 04:19 PM

use the /sbin/nologin shell

bbrian017 09-09-2010 06:38 PM

-bash: useradd: command not found

Anyone know why it's giving me this?

I'm using Linux.

dhugh 09-09-2010 07:06 PM

Hi bbrian017. Are you in root mode when you issue the command? If it doesn't work from root, try 'find / -name useradd' to locate and type in the full location name.

bbrian017 09-09-2010 07:27 PM

I thought I was root but I guess I wasn't!

I am now I ran the command and I think it worked.

How do I set the users ftp password?

dhugh 09-12-2010 06:28 PM

Hi bbrian017. From root and the command line try 'passwd username' and answer the prompts for the password.

bbrian017 09-13-2010 08:34 AM

Thanks that worked perfect!


All times are GMT -5. The time now is 07:00 PM.