Koozali.org: home of the SME Server

FTP set up

Offline asterof

  • *
  • 37
  • +0/-0
FTP set up
« on: May 22, 2007, 04:46:02 PM »
I have read most of the topics here
But I see a lot of different ways but none seem simple or seem
a little confusing

In some areas it seems you create a group like ftpusers
and assign that group to an ibay
In some areas it seems you create a user like ftpuser password of download and use that users file area

so lets make this simple
I have an ibay called ftp_download
I have a group called ftpusers with a password of download
I have ftp access set up as  Allow public access
                                         Accept password from anywhere

I have files located in ftp_download
when I do ftp://ftpuser:download@niftech.net
it drops me into the ftpuser file directory
not the ftp_download ibay
how do I resolve this

test it to see
ftp://ftpuser:download@niftech.net  :shock:

Offline MasthaX

  • **
  • 52
  • +0/-0
FTP set up
« Reply #1 on: May 22, 2007, 05:57:34 PM »
this is probably the same thing i had. You should go 2 folders up to "/". You will be in the main folder. im learning how to set default folders i will report it if i got something
There's no place like 127.0.0.1

Offline bpivk

  • *
  • 908
  • +0/-0
    • http://www.bezigrad.com
FTP set up
« Reply #2 on: May 22, 2007, 10:12:46 PM »
There is no need to open two topics.
http://forums.contribs.org/index.php?topic=37095.0 here is MasthaX's topic and you can folow that thread.

[hint] Contains some answers. [/hint]
"It should just work" if it doesn't report it. Thanks!

Offline asterof

  • *
  • 37
  • +0/-0
does not apply
« Reply #3 on: May 22, 2007, 11:04:05 PM »
First I don't want to buy or install the add on
Second, I don't want to use an ftp client,
they should be able to use  ftp://user:password@niftech.net
and see a list of files in the ibay, no need to navigate up in directories
Third, I don't want public access to upload
Forth, I think I defined the issue very well, just need to know
how to do the redirection. Using my freebsd server this is easy
but the limitation of the server manager makes it difficult.
I have read most of the postings here, but really answer the question

Question
What remains to be done, and how is it done to allow
ftp://ftpuser:download@niftech.net
to display the files listed in the ibay ftp_downloads and allow a file to
be downloaded.
This is not posible to setup in the server manager

Offline scorched

  • 10
  • +0/-0
FTP set up
« Reply #4 on: May 23, 2007, 03:20:44 AM »
Hello,

From command line:
mkdir /etc/e-smith/templates-custom/etc/proftpd.conf/
cd /etc/e-smith/templates-custom/etc/proftpd.conf/
cp /etc/e-smith/templates/etc/proftpd.conf/50AnonymousPrimary .
vi 50AnonymousPrimary
change "AnonRequirePassword" on
:wq
/sbin/e-smith/expand-template /etc/proftpd.conf
In server manager allow external ssh*note only users with a shell can successfully ssh in*.
In server manager change the ibay password for ftp_download to be secure.
vi /etc/passwd
change "ftp_download's /bin/false" to "/bin/bash" *note this will allow ftp_download to ssh*

At this point you should be able to access your ftp ibay with ftp_download with the set ibay password. Read on for allowing per user access to this ftp area.

The simple method(doesn't require installing additional SME panels) is to:
create the user in server manager then from command line:
/sbin/e-smith/db accounts setprop ftpuser ChrootDir /home/e-smith/files/ibays/ftp_download/files
vi /etc/passwd
change the intended user(ftpuser in your case) entry from:
"/usr/bin/rssh" to "/bin/bash"
"/home/e-smith/files/users/$user" to "/home/e-smith/files/ibays/ftp_download/files"
:wq
Access server manager and add the user to the relevant group that owns, has read and or write access to the ftp_download ibay.
Probably consider removing the pseudonyms for this user.
Make sure this users password is secure.
*note this user should not be used for mail*

Access via ftp client:
server: ftp.niftech.net, www.niftech.net or any live alias.
username: either the ibay name or dedicated ftp user for this ibay.
password: your secure password :p

Access via browser:
ftp://www.niftech.net/
You will be prompted for username and password.

Regards,
Scorched

Offline asterof

  • *
  • 37
  • +0/-0
Where are these commands listed
« Reply #5 on: May 23, 2007, 03:28:04 PM »
I don't quite understand the concept of templates
in the SME server
Also, there is no documentation that I have found that
lists or shows those commands
Is that a Linux foundation command list, cause the commands
look like standard UNIX command line structures

Offline scorched

  • 10
  • +0/-0
FTP set up
« Reply #6 on: May 24, 2007, 03:16:17 AM »
E-smith regenerates its configuration from templates which break down the config files that linux typically uses.
E-smith has its default templates in /etc/e-smith/templates/* which should never be modified.
To make configuration changes you need to copy the templates you intend to change to its respective directory structure under /etc/e-smith/templates-custom/* which when running "expand-template" will overwrite the defaults.
Some of the commands I described are standard linux commands and some belong to SME server.
You should never directly modify config files in SME that have associated templates. The next time e-smith generates its configuration from templates your changes will be lost.
A quick explanation of a template:
The template for httpd.conf for example is located in a directory /etc/e-smith/templates/etc/http/conf/httpd.conf/ *note that the directory is named the same as the config file* Under this directory are files which make up the different sections of http.conf. To modify /etc/httpd/conf/httpd.conf you first make the directory /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf then copy the associated file to the section you wish to modify. After making the changes you simply run /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf then restart httpd.

Offline asterof

  • *
  • 37
  • +0/-0
been trying
« Reply #7 on: May 25, 2007, 04:13:20 PM »
Well I been trying to get this to work
But I am missing something
Anyone care to try for a six pack of bud ?  :P
ftp://ftpuser:download@niftech.net
ftp://www.niftech.net
ftp://niftech.net

Offline p-jones

  • *
  • 594
  • +0/-0
FTP set up
« Reply #8 on: May 26, 2007, 09:11:34 AM »
I can see you PDF with option 1 and it looks like I could download it OK.
Options 2 & 3 take me to a blank window. Passwords, login info is not requested for any option.
...

Offline p-jones

  • *
  • 594
  • +0/-0
FTP set up
« Reply #9 on: May 26, 2007, 09:13:06 AM »
I tell a lie..option 1 requires a username and password to download.
...

Offline scorched

  • 10
  • +0/-0
FTP set up
« Reply #10 on: May 28, 2007, 09:40:51 AM »
First try to get it working with the ibay name and password set from your server-manager, it is much simpler than getting a user set up and to point in the right spot.

Make sure:

In /etc/proftpd.conf "AnonRequirePassword on" (If not make sure your templates are setup as previously explained).

In server manager:
remote access - secure shell access "allow public access(entire internet).
remote access - ftp access "allow public access(entire internet).
remote access - ftp password access "allow public access(entire internet).

information bays - ftp_download - user access via file sharing or user ftp "group rw".
information bays - ftp_download - public access via web or anonymous ftp "allow public access(entire internet).
information bays - ftp_download - set a secure password.

vi /etc/passwd
ftp_download shell is set to "/bin/bash".

Just check to make sure that the <anonymous> sections in your /etc/proftpd.conf are set to "on" for your primary and your ftp_download sections. If they arn't don't modify this file. you need to source the problem elsewhere in your templates.

Offline asterof

  • *
  • 37
  • +0/-0
Thanks I di as you indicated
« Reply #11 on: May 29, 2007, 03:52:38 PM »
however the syntax on the section


remote access - secure shell access "allow public access(entire internet).
remote access - ftp access "allow public access(entire internet).
remote access - ftp password access "allow public access(entire internet).

was a little different

please chaeck it to see if it is set up
properly
thanks

Offline asterof

  • *
  • 37
  • +0/-0
well still not working
« Reply #12 on: May 29, 2007, 04:04:39 PM »
anyway, At this point im looking to hire someone
to get a few things resolved
If your interested
send an email to
asterof@yahoo.com
thanks
PS, I just dont have the time, and need to get it resolved
thanks again