Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

new to ftp need advice

Status
Not open for further replies.

tony84

Programmer
Jul 3, 2002
17
FR
Hi,

i have linux for few month about 7, and i want to start personal webhost, just learning how web host do.
I have install apache working fine, installed Mysql working fine etc..
Now i'm on FTP not working so fine: anyways i read in the threads before that the new wu-ftp is ProFTPD, so i downloaded it(version 1.2.5 something similar) and installed it.
Now what i have to do just follow the instruction or should i setup FTPD editor?
Now i'm a bit lost, where should i start?
any advice is appreciated.

Regards,
Anthony Ward

 
Wu-FTPd and ProFTPd are separate and un-related FTP servers. I prefer using ProFTPd.

If you already have Apache up and running, your half way there with ProFTPd. ProFTPd uses a lot of the same directives as Apache, so if you understand the httpd.conf file, the proftpd.conf file she be easy to pick up. Proftpd.conf is the only file you need to edit to get ProFTPd working. Mine is located in /usr/local/proftpd/etc/proftpd.conf.

The ProFTPd guide is here -->

ChrisP If someone's post was helpful to you, please click the box "Click here to mark this post as a helpful or expert post".
 
Hi,

i have the same path, i have another question.
What should i do with guest user that is what i'm interested in.
and my new question is , if i want to make ftp account automated, like i create a perl script to add a new user as guest, should i always update proftpd.conf?

Anthony
 
I'm sorry, I'm not sure what you are asking me about a 'guest' user. Do you want anonymous access to the server?

To only allow certain users to login to the server, add them all to a group. Call the group whatever you want - we'll call it "groupA". In the proftpd.conf file, you might want to do something like this...

<Limit LOGIN>
DenyGroup !groupA
</Limit>

This will only allow members of groupA to log in to the FTP server. You don't need to update the proftpd.conf file when adding/removing users, just add or remove them from the 'groupA' group.

ChrisP If someone's post was helpful to you, please click the box &quot;Click here to mark this post as a helpful or expert post&quot;.
 
Hi,

what i meant, is like in web host when you have a website and login in your website you just go into your folder and can Not go anywhere else.

Regards,
Anthony
 
Use this directive...

DefaultRoot /path_to_folder

This will &quot;jail&quot; all users in the folder specified by the DefaultRoot directive.

ChrisP If someone's post was helpful to you, please click the box &quot;Click here to mark this post as a helpful or expert post&quot;.
 
Hi,

but i'm not the polic :)


Anyways, thanx i will try tomorrow and if i problems i'll put a nwe post

anthony
 
Hi,

I have a new question,
what i want to do is to have people to have their own folder, with own username and password to login into their folder.
And How do i create a group? and how can i set up the a user account with <username><password><their own folder>?

Anthony
 
So you want everyone to be locked into their home drives?

Use this directive...

DefaultRoot ~

You might want to read this doc too...


Just add regular users and assign them passwords. Use the useradd and passwd commands to create users and then assign passwords. I think all Linux distro's will automatically create the home directories for you in /home, when using the useradd command.

ChrisP

If someone's post was helpful to you, please click the box &quot;Click here to mark this post as a helpful or expert post&quot;.
 
Hi,

here is my reall problem.
I'm under root, and i want to use proftpd under root which is a Group .
Also i do not have a domain name i run under my own IP for the moment.
so, how can i make people access to their own folder?
like
username : tony84
password : blabla
Goes to folder /usr/home/web/tony84
and then username: stop
password: blab
goes to folder /usr/home/web/top
etc....
i can only guess that the group is root since i'm under root, but what should i modify in proftpd.conf?

Anthony
 
I told you in my last post. If those directories are their home directories, then all you need to do is set....

DefaultRoot ~

The tilde represents a users home directory.

&quot;i want to use proftpd under root which is a Group&quot; --> You don't want to run ProFTPd under the root group. Use something like this in proftpd.conf....

User nobody
Group nobody

...or even better than that is if you created a new user and group just for Proftpd.

ChrisP If someone's post was helpful to you, please click the box &quot;Click here to mark this post as a helpful or expert post&quot;.
 
Hi,

but i try to find out how to use adduser to add a new user to /etc/passwd but i couldn't find anything about it.
Also, how can i connect to my ftp with the konsole?
also what you suggest is my &quot;server&quot; to be logged in under
nobody
not as root? correct?

Regards,
Anthony
 
To add users...

useradd 'username'

I'm assuming the 'konsole' is a shell prompt from within the KDE environment? Correct? If it is, just use the ftp command...

ftp 'ip_address'

You can also use a GUI FTP client, if you wanted to do it that way.

Don't use the root user or group for ProFTPd. You set the user and group in the proftpd.conf file. Using root could be a major security risk.


ChrisP If someone's post was helpful to you, please click the box &quot;Click here to mark this post as a helpful or expert post&quot;.
 
Hi,

Thanx you again
Now i'd like to focus on adding a user
Konsol is indeed the shell.
so i did
adduser or useradd (samething): so i do
shell> adduser <username> -g <group> -p <password>
more detailed.

shell> adduser tony84 -g nobody -p mypass
what about the home directory i don't how to put it, it should be something like /usr/web/<username> or /usr/web/tony84


Anthony
 
adduser is a symbolic link to useradd. The adduser command actually doesn't exist anymore and is being fazed out. Use the useradd command instead.

The default location for new users home directories is /home/username. If you want to change this to something else, use the -d option when adding a new user...

useradd someuser -d /usr/web/someuser

If the user already exists and you want to change their home directory, first create that directory in the location you want and then use the usermod -d option to change the home directory...

[root@linux01 /root]# grep someuser /etc/passwd
someuser:x:517:517::/home/someuser:/bin/bash
[root@linux01 /root]# mkdir /tmp/someuser
[root@linux01 /root]# chown someuser.someuser /tmp/someuser
[root@linux01 /root]# usermod -d /tmp/someuser someuser
[root@linux01 /root]# grep someuser /etc/passwd
someuser:x:517:517::/tmp/someuser:/bin/bash
[root@linux01 /root]#

Remember to change the user and group permissions on the new home directory, as shown above using the chown command.

ChrisP If someone's post was helpful to you, please click the box &quot;Click here to mark this post as a helpful or expert post&quot;.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top