How to create FTP user Freesco 3.8 for dummies.

Support section for FREESCO v0.3.x

How to create FTP user Freesco 3.8 for dummies.

Postby lotus123r5 » Thu Aug 09, 2012 12:24 pm

Hello Freesco, linux specialists,

Iam looking for a tutorial to create an ftp account user for other people to send some files to me.
It dont have to super secure but just ftp will be fine, so that they can write to the server, kind of /home/ftpuser directory.
The following manual i find on internet:

http://knowledgelayer.softlayer.com/que ... thin+Linux
-----------------------------------------------------------------------------------------------------------------
Creating an FTP Account within Linux:

For this example, I am using Vsftpd, as it is the default FTP client distributed with RedHat, however these instructions should apply to most FTP server applications.

Create a FTP user group. eg: ftpaccounts
#/usr/sbin/groupadd ftpaccounts

Add a new user to this group, and set the default path of that user to /home/user/.
#/usr/sbin/adduser -g ftpaccounts -d /home/user/ testuser

Set a password for the newley created user.
#passwd testuser

Set ownership of /home/user to the testuser and ftpaccounts.
#chown testuser:ftpaccounts /home/user

Give Read/Write access to testuser and all members in ftpaccounts
#chmod 775 /home/user

Edit /etc/vsftpd/vsftpd.conf file and make sure 'local_enable=YES' is uncommented.

Restart the vsftpd service.
#/etc/init.d/vsftpd restart

-----------------------------------------------------------------------------------------------------------------

Is this great manual / documentation also OK for Freesco? Thx in advanced!
Grz, Maikel
User avatar
lotus123r5
Member
 
Posts: 61
Joined: Sat Oct 04, 2008 7:58 am

Re: How to create FTP user Freesco 3.8 for dummies.

Postby Lightning » Sun Aug 12, 2012 9:51 am

Creating an FTP Account within Linux:
Most of the web type help howto's other than specific command functions are not going to work with FREESCO because it is created differently.

try

useradd

or

useradd some-user-name

Make sure and answer yes to the create a "home" directory when prompted and the directory it will create will be in "/home/user-mame"

Other related commands

userlist
useredit
userdel

Even though a lot of things are automated in FREESCO make sure and take a look at the "web control panel" as things are EXTREMELY simplified.
http://router.inet:82/

I would also strongly recommend installing the "mc" package for managing files on the system.
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 12079
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Re: How to create FTP user Freesco 3.8 for dummies.

Postby lotus123r5 » Mon Aug 13, 2012 2:15 am

THX Lightning! Will test it today, but for sure you give me the information i need. THX!
User avatar
lotus123r5
Member
 
Posts: 61
Joined: Sat Oct 04, 2008 7:58 am

Re: How to create FTP user Freesco 3.8 for dummies.

Postby lotus123r5 » Mon Aug 13, 2012 11:42 am

Almost done.......... but not totally......... satisfied.
I allready have a ftp account which work, but i want a new ftp account wich will come into it's own ftp directory when making a ftp connnection.
i make a new ftp accout "ftp02" with the command useradd, via telnet by root, but it didnt create any directory in Freesco 0.3.8.
so i delete the ftp user and make a new ftp account "ftp02" with the freesco Control panel: http://router.inet:82.
also the freesco control panel didnt make a directory in /home (even when i say "y" to make an home directory).
I can make a ftp connection with the new account "ftp02", but the account "ftp02" comes into the same ftp directory as my other ftp account (ftp01): /home/ftp (where all files all listed from ftp01)
When i check the userlist with the control panel is see that both ftp accounts go to the home dir: /home/ftp
Can i changed this smiply (by modifying a file or something else), so that ftp account "ftp01" automatically goes to /home/ftp01 and ftp account "ftp02" automatically goes to /home/ftp02?
and how can i best protect the directory by chmod, chown, chgrp, so that ftp account "ftp01" have write access in /home/ftp01 and ftp account "ftp02" have write access in /home/ftp02?
Hope it wont be to difficult to manage this..... with some freesco commands?... Thx! again!
Grz, Maikel
User avatar
lotus123r5
Member
 
Posts: 61
Joined: Sat Oct 04, 2008 7:58 am

Re: How to create FTP user Freesco 3.8 for dummies.

Postby Lightning » Mon Aug 13, 2012 8:35 pm

Yes what you are asking is reasonably simple. What you need to do is to create a "normal" user rather than an ftp user. I was not thinking about it completely clearly as FTP accounts always go into the /home/ftp directory and normal users have individual directories if you say "yes" to the home directory question. In the 04x series the useradd command does not ask about a home directory when you choose and FTP account. The ONLY difference is that normal users also have shell access if your SSH server is open to the public. Which that can be easily changed if you do not want these new users to have shell access by editing the /etc/passwd file and changing the line

useradd ftp01 "normal user = y" Home directory = y"
edit /etc/passwd
Code: Select all
Change
ftp01:JPwKnbcDs6orA:1006:100:test1:/home/ftp01:/bin/sh
to
ftp01:JPwKnbcDs6orA:1006:100:test1:/home/ftp01:ftp


This will create home directories with the correct privileges.
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 12079
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Re: How to create FTP user Freesco 3.8 for dummies.

Postby lotus123r5 » Tue Aug 14, 2012 2:18 am

Check,
Will try it later. Thx again for your helpfull information!
User avatar
lotus123r5
Member
 
Posts: 61
Joined: Sat Oct 04, 2008 7:58 am

Re: How to create FTP user Freesco 3.8 for dummies.

Postby Lightning » Tue Aug 14, 2012 7:21 pm

Thinking about this situation, there isn't a good reason why the useradd command doesn't have the option of creating a home directory for FTP users. So I just added that to the command and it will be an option in 0.4.5 when it is released.
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 12079
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Re: How to create FTP user Freesco 3.8 for dummies.

Postby lotus123r5 » Thu Aug 16, 2012 12:05 pm

Hello Lightning
Make my Day! it works PERFECT! THX agaaaain!

OK, last question, cause when i create a normal user i also see the folder pub_html was created with a file inside: "index.htm"
so i find out that the useradd also create a web server for the user, what is real awesome.
so i create another (Normal) user named "test02", so if i want to view the website of user "test02", i can just put in an external browser: http://myfreescoserver.dynds.org/test02/ ?????
That will work???... if the answer would be a "Yes" than it is real great!
So (i go on).. if i make user "test02" a ftp user by editing the passwd file for "test02" the ftp user "test02" could manage his own website on my Freesco Server?..... that would be magic!
Is my theory ok, or not................? Thx again!!!
User avatar
lotus123r5
Member
 
Posts: 61
Joined: Sat Oct 04, 2008 7:58 am

Re: How to create FTP user Freesco 3.8 for dummies.

Postby Lightning » Thu Aug 16, 2012 9:20 pm

The answer is yes to everything, except a minor change.
The first thing is that the actual URL to get to a users web page would be something like

http://myfreescoserver.dynds.org/~test02/

A tilde in front of the name to tell the web server it is a users web page.
if i make user "test02" a ftp user by editing the passwd file for "test02"
Just to be clear, a normal user also has FTP access. The only reason to force a normal user to an FTP account is to not allow shell access using SSH if your SSH server is open to the public.
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 12079
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Re: How to create FTP user Freesco 3.8 for dummies.

Postby lotus123r5 » Fri Aug 17, 2012 8:03 am

Hmmmm,

dont work Lightning....:
have this as example (home dir + http direcotry)
/mnt/bootdev/router/pkg/home/test02/pub_html/index.htm
if i login extern with: http://mijnfreescowebserver.dyndns.org/~test02/
then i get a login display in mozilla (username and pssword is being requested.......)
if i try to login with the account test02 and password it says: 404 Not Found - '/~test02' was not found.- thttpd
right on the test02 directory are: 0755 and index.htm has 0644 rights.
Maybe i do something wrong......
same result if i try:
http://mijnfreescowebserver.dyndns.org/ ... /pub_html/
http://mijnfreescowebserver.dyndns.org/ ... /index.htm
Maybe i do something wrong........ thx.... again.
ps: test02 is a Normal user: test02:AImpRpyDlp.0c:1004:100:test02:/home/test02:/bin/sh
User avatar
lotus123r5
Member
 
Posts: 61
Joined: Sat Oct 04, 2008 7:58 am

Re: How to create FTP user Freesco 3.8 for dummies.

Postby Lightning » Fri Aug 17, 2012 8:41 pm

Run the "setup" and you have to enable the web server for "Users public web pages". Save the setup and restart the web server.

rc_httpd restart
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 12079
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Re: How to create FTP user Freesco 3.8 for dummies.

Postby lotus123r5 » Mon Aug 20, 2012 11:24 am

Hello Lightning!
Thx it works great!
really really nice!!!
Thx! again for your superb knowledge, answers and explanation!
have some more questions know..... will start a new topic on that one...
User avatar
lotus123r5
Member
 
Posts: 61
Joined: Sat Oct 04, 2008 7:58 am


Return to FREESCO Support for v0.3.x

Who is online

Users browsing this forum: No registered users and 8 guests

cron