LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   how do you setup users on ProFTPD? (https://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.

ShawnD 07-19-2002 02:31 AM

ok then how do i figure out what the password for my newly created user is?
i just made a user called joe (to test this FTP thing out) and this is what it says:
joe:!!:11887:0:99999:7:::

what the heck does that mean :confused:

Mik 07-19-2002 03:07 AM

The password hasn't been set for that user yet.
Run the command 'passwd joe' to set the password for the user joe.

ShawnD 07-19-2002 04:58 AM

i can always change the password back right? like if i go root then run 'passwd joe' i can change the password to something else?

RefriedBean 07-19-2002 06:03 AM

Quote:

Originally posted by ShawnD
i can always change the password back right? like if i go root then run 'passwd joe' i can change the password to something else?
Yes, that is correct :)

ShawnD 07-19-2002 06:35 AM

this kicks soo much butt!!! everything is falling into place!

i got my FTP working, i got my website working, i got my ikonboard working (had to change shebang line to #!/usr/bin/perl5.6.1), my game server has more clients than ever, i'm learning Linux super fast

i just have to thank you people for all your help :)

Mik 07-19-2002 08:13 AM

Probably not necessary but might make life easier for you. Usually it's pretty standard for a perl script to have the first line as #!/usr/bin/perl

So if you don't want to modify every perl script you use and don't want to further break anything by changing the perl install. You could make a simple link to the perl5.6.1 executable.
Just run something like:

ln -s /usr/bin/perl5.6.1 /usr/bin/perl

ShawnD 07-19-2002 01:01 PM

that's how it's setup actually. i NEED to change that shebang line, as soon as i change it back to /usr/bin/perl it says "Internal Server Error" and the apache log says "script headers ended early", not worded exactly like that but it has that message behind it.

kermit 08-01-2002 09:33 AM

Quote:

Originally posted by trickykid
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.
I did that but I don't know how to avoid this ftp users logging in (through telnet, for example).

What I want to do is to have some users that can ONLY access ftp.

I tried to assign shells like /dev/null to the user but it avoided logging both ftp and telnet.

thank you for your help


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