LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   how do you setup users on ProFTPD? (http://www.linuxquestions.org/questions/linux-software-2/how-do-you-setup-users-on-proftpd-26023/)

ShawnD 07-17-2002 10:17 PM

how do you setup users on ProFTPD?
 
it's an FTP program as you guessed. ;)

the manual says to make lines similar to this:
<Anonymous ~private>
AnonRequirePassword off
User private
Group private
RequireValidShell off
<Directory *>
<Limit WRITE>
DenyAll
</Limit>
</Directory>
</Anonymous>

but it does not say what any of the values should be. it does not give good examples of things like "this is how you create a login for a guy with this name, this password, these rights to this directory". it just sort of says what SOME of the things it is doing means, there may be a line with a comment, there may not be....it's very hard to understand what they are trying to put across.

could somebody please give me an example for this thing? just an example of how to make a login for a guy named 'joe' password is 'linux' and he has full upload and download access over the folder /var/junk
damn confusing manual :confused:

Mik 07-18-2002 10:26 AM

You would have to create just normal users using commands like useradd. If you only want these users to be ftp users and their home directory should be /var/junk. Then you can either add the shell /bin/false and the home directory to the command line when calling the useradd command. Or you could edit the file /etc/passwd and set the shell and home directory to the right location.

ShawnD 07-18-2002 03:40 PM

confusing instructions. how are you supposed to impute this useradd command if the FTP server is a program that runs in the background?

trickykid 07-18-2002 04:05 PM

You would type useradd at the command prompt.

man useradd for more details.

ShawnD 07-18-2002 04:28 PM

oh so FTP users are actual users on my operating system and not just my FTP? i can actually login as those guys?

trickykid 07-18-2002 04:41 PM

Quote:

Originally posted by ShawnD
oh so FTP users are actual users on my operating system and not just my FTP? i can actually login as those guys?
Yeah that is how I have mine setup. I disable anonymous login, setup a user, have the ftp directory as their home directory and user/group ownerships to limit what they can do on the machine.

ShawnD 07-18-2002 05:14 PM

could you tell me how to give a guy full read and write access to the folder /var/junk for a user named joe? i learn by examples.

trickykid 07-18-2002 07:06 PM

Quote:

Originally posted by ShawnD
could you tell me how to give a guy full read and write access to the folder /var/junk for a user named joe? i learn by examples.
Alright, first create joe and make his home directory /var/junk.

If you want full read write access for joe in /var/junk, you want him to be owner or just part of a group ?

If he is owner or to make him owner:

chown joe /var/junk

For group ownership, say he is in the group users:

chgrp users /var/junk

Now to give the permissions for user joe, if he is owner, he should have already read and write access and executable by default.

If he is just part of the group users and you want him to have the read and write access:

chmod 760 /var/junk

That will give him read and write, the owner has full access and anyone else not part of the group no access.

I hope this helps, any other questions just ask.

might want to man chmod for more details on permissions.

ShawnD 07-18-2002 08:03 PM

then he can log in as joe and actually access that file?

i can't believe how warped my sense of thought towards FTP was....i used to use Windows.

if there is a user "shawn" on the computer, does that mean i can FTP in as shawn?

trickykid 07-18-2002 08:28 PM

Quote:

Originally posted by ShawnD
if there is a user "shawn" on the computer, does that mean i can FTP in as shawn?
Unless you block him access to FTP.

RefriedBean 07-18-2002 09:32 PM

Wow!
Thanks, now I know too! I had no idea it was so easy :)

RefriedBean

PS, this is my 100'th post!! Wooo!!:cool: :cool:

ShawnD 07-19-2002 12:27 AM

ok then we're getting progress here.
i can make the user name but i have a few questions

- how do i set their home directory as something else? i need to specifically know how not a vague answer that seems simple to you :)

- how do i give them full access to that folder? just make sure it's chown(ed) to that user name?

i'm asking all these questions because i serve as a host for this friend of mine, on the Windows computer FTP was simple because it was a program that would configure it for me...i'm goin on holidays in like 4 days so i'm on a buget of time lol ;)

trickykid 07-19-2002 01:19 AM

Quote:

Originally posted by ShawnD
- how do i set their home directory as something else? i need to specifically know how not a vague answer that seems simple to you :)

- how do i give them full access to that folder? just make sure it's chown(ed) to that user name?

After making the user, easiest way to set their home directory is to edit /etc/passwd file.

If you want the user "joe" to have full access and ownership to a particular directory like /var/junk for example, just do these two commands:

chown joe /var/junk

chmod 755 /var/junk

That will make him owner and give permission of Read, Write and Execute for him, and Read and Execute for everyone else.

ShawnD 07-19-2002 02:09 AM

ok we're getting real progress here but what does the stuff in passwd mean? here is what mine says:
shawn:x:501:501:shawn:/home/shawn:/bin/bash

shawn is my name, what is x? what is 501? here is what i'm thinkin
username:(don't know):(don't know):(don't know):username:home folder:shell program

am i right?

Mik 07-19-2002 02:21 AM

The second field is the password. The x is because you are using shadow passords so the encrypted password will be contained in /etc/shadow. The third is the user id number, the fourth the group id number. The group id is link to a group name in the /etc/group file.

You can type 'man 5 passwd' to find out more about this file.


All times are GMT -5. The time now is 12:39 AM.