Koozali.org: home of the SME Server

I need to allow users to download files via FTP. I have remote access enabled

Offline LANMonkey

  • *****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
I need to be able to allow users to download files from my SME server.

I have manage to configure my server so that I can allow downloads from the primary site as anonymous or from one of the iBays as a SME user.  I don't imagine I'll be getting a lot of traffic, so creating users to access iBays is not an obstacle yet.  But I would like to be able chroot them into a place away from the basic website that makes up the iBay.  How do I do that?

And I am having spotty performance problems accessing the FTP sites.  Sometimes it works and sometimes I get "page not found" errors.  Generally, what are the limitation of SME for use as a FTP site?  I have tried making direct links to files and I haven't had any success yet.  For example, I make a link, ftp://www.myprimarysite.org/myfile-to-be-downloaded.file and this doesn't work.  What also doesn't seem to work is ftp://user@www.myiBaysite.org/myfile-to-be-downloaded.file.

Is it my browser causing problems?  Am I missing something basic to FTP?  Or does SME have some specific limitations that I need to know about?

I've seen the documentation for the Manual, the Howto and I've searched the forum and nothing seems to shed light on my mission.

Offline TerryF

  • grumpy old man
  • *
  • 1,848
  • +6/-0
Why not use the contrib http://wiki.contribs.org/Webshare is a useful addition.
--
qui scribit bis legit

Offline stephdl

  • *
  • 1,523
  • +0/-0
    • Linux et Geekeries
else you can use the firewal contribs http://wiki.contribs.org/SharedFolders with a external access on webdav and pretty acl to give permissions to users... it works on sme8
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline LANMonkey

  • *****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Both webshare and SharedFolders look promising.  But I don't want to make users go to a folder to pick out downloads.

I want to enable one click downloads where a user (anonymous included) can just click a link and that will initiate a download.  Can I do that with either of these contribs?

Offline janet

  • *****
  • 4,812
  • +0/-0
LANMonkey

Quote
I need to be able to allow users to download files from my SME server.....I have manage to configure my server so that I can allow downloads from the primary site as anonymous or from one of the iBays as a SME user..

As you have found, anonymous FTP to download files from sme server should work OK using a web browser, with the correctly formatted URL


Quote
......creating users to access iBays is not an obstacle yet.  But I would like to be able chroot them into a place away from the basic website that makes up the iBay.  How do I do that? I've seen the documentation for the Manual, the Howto and I've searched the forum and nothing seems to shed light on my mission.

Did you really thoroughly & carefully read the Manual (Chapter 14), and the Howtos ?
ie
http://wiki.contribs.org/SME_Server:Documentation:Administration_Manual:Chapter14#Accessing_the_i-bays
http://wiki.contribs.org/FTP_Access_to_Ibays
http://wiki.contribs.org/SFTP


Quote
Is it my browser causing problems?  Am I missing something basic to FTP?  Or does SME have some specific limitations that I need to know about?

To chroot the users install the smeserver-remoteuseraccess contrib.
Then you MUST use a FTP client eg WinSCP, SmartFTP etc, and login with a valid username and password.

Note you cannot use a web browser, so this may be what you are doing incorrectly.

If you believe in security, then you will always use SFTP instead of FTP, which implies the use of a client like WinSCP rather than a web browser.
There are better more secure ways than using FTP.

You say you want "one click" browser based FTP access, but that is not achievable for your stated goals.


Quote
I want to enable one click downloads where a user (anonymous included) can just click a link and that will initiate a download.

If anonymous user access is OK, then what is the point (in your situiation) of forcing users to login to access the same files.
You can get one click access to download files using http://domain/filename
Of course these files can then be downloaded by anybody, but hey, you just said anonymous download is ok.

« Last Edit: February 24, 2013, 06:56:40 PM by mary »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline LANMonkey

  • *****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Thanks for your very thorough reply.

I have some stated goals and also, there are some things I have already done to meet other goals.

I use WinSCP to work on my SME websites.  I also use Notepad++ and its file access functionality -- whatever that is -- to work on my SME websites.  I have also Dreamweaver to do some work on my SME websites.  I have made changes to my SME server in order to use this software on my Windows client to work on my SME websites.  I don't recall exactly the changes I made and also, these clients work only to a limited extent and I have long since given up what is I am supposed to remove the limitations.  I just try and work around them.

Below is link to my primary site.

ftp://www.symbiota.net

If you manage to get in you should be able to see three files.  Two are text files and the other is a .mobi file.  I would like to be able to provide a link to that file so that a user could just click it and intiate a download of the mobi file.  At this point, my experience is that after you open the FTP page in your browser, if you click the text file, the browser simply opens the text file as if it were an HTML page.  If you click the .mobi file, it just offers an error, "this web page is not available".  For a little while, I could click the .mobi file and it would initiate a download from my browser.  But it quit doing this and I can't figure out why.  What I would like to be able to do is just offer a link to that page,  ftp://www.symbiota.net/mymobifile.mobi and for any user, it would initiate a download.

I am happy to use my primary site as a repository for files that I would like anonymous users to download.  I don't want anyone but myself to be able to upload anything.

Offline janet

  • *****
  • 4,812
  • +0/-0
LANMonkey

The text file is being opened because the browser is configured to do that. Similar to file associations, which program opens what file type.

It is a good idea to record changes (ie write them down somewhere) made to your server, or otherwise you can search the db values or custom templates to look for non standard settings.

I did a little experimentation & guestimation about your site.
It seems your files are in the ..../files folder, rather than the ..../html folder.
Try
http://symbiota.net/files/ICTY_20111222-104541-1.mobi
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline LANMonkey

  • *****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
That's very strange and unexpected.

So FTP is not even involved for initiating a download like that?  The link you posted that opens a download dialogue uses HTTP, not FTP.

And also, if an anonymous user can browse ftp://symbiota.net, then how do they download that .mobi file from that open window?  I tried dragging it to an open explorer window and that didn't seem to work.

Offline janet

  • *****
  • 4,812
  • +0/-0
LANMonkey

Is FTP really enabled in server manager (in Remote Access panel) ?

The correct/more appropriate URL for FTP access would be something like

ftp://ibayname@ftp.symbiota.net

See
http://wiki.contribs.org/SME_Server:Documentation:Administration_Manual:Chapter14#An_i-bay_Used_as_Your_Customer_Download_Site
"A customer accesses the site using the FTP client in their web browser to login as the i-bay user name by entering the URL ftp://menus@ftp.tofu-dog.com "
« Last Edit: February 24, 2013, 10:12:53 PM by mary »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline LANMonkey

  • *****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Problem solved, I think
« Reply #9 on: February 25, 2013, 02:38:05 AM »
LANMonkey

Is FTP really enabled in server manager (in Remote Access panel) ?

The correct/more appropriate URL for FTP access would be something like

ftp://ibayname@ftp.symbiota.net

See
http://wiki.contribs.org/SME_Server:Documentation:Administration_Manual:Chapter14#An_i-bay_Used_as_Your_Customer_Download_Site
"A customer accesses the site using the FTP client in their web browser to login as the i-bay user name by entering the URL ftp://menus@ftp.tofu-dog.com "

Yes, I have taken my browser to an iBay site using ftp://username@ibayadress.  And I've also read that without a user name, a anonymous users will always find themselves at the primary site.  But I can't log in with a user to the primary site, ftp://username@www.symbiota.org.  And I know that the user must be provided in the group and individual permissions for that user in order to get into a particular iBay set with certain permissions.

I think at this point, I have enough information to proceed.  Unless ...

For example, if I want to download the ISO for SME server, I pick a mirror site and I find myself in various directories.  But these are just the open directories when directory browsing is involved and so is just like the HTTP link you provide.  So an FTP connection is not necessary for direct user downloads.  There are also the software download sites, I guess those links are just HTTP links as well.

Clearly I am missing something in the understanding of HTTP.  Of course when you open an HTML page in a browser, a download is involved.  But if the browser can't interpret the page, then it might as well download it anyway and so you can download all kinds of things, assuming the browser is not going to interpret it itself.  With PDF files, downloading is always an option, even when you have the extra Adobe add-in interpreting for the browser.

It's getting clearer, thanks all who posted and helped me along.

Offline purvis

  • *****
  • 567
  • +0/-0
You can also provide a user name and user password and not make it anonymous if you liked.
I do not know how much inconvenience you want to save a  person.
Some where in Apache, I thought you can keep the directory from providing a listing of the files to a browser.

Also i have always had problems with Firefox being used as a ftp client. Windows Internet Explorer does well with ftp.
 

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Problem solved, I think
« Reply #11 on: February 26, 2013, 02:14:17 AM »
LANMonkey

I have not used FTP for a Looong time as it is simply not secure, so maybe I forget a little.

For an ibay access, the user should be the ibayname & the password wil be the password you set particularly for that ibay.

Also you keep showing a URL of
ftp://username@www.symbiota.org
but you should be using
ftp://username@ftp.symbiota.org

Also please answer
1 - have you enabled FTP access in Remote Access panel of server manager. You need to do this to enable the FTP server in sme

2 - If you want to lock authorised users into an ibay (ie jail them), then you need to use the smeserver-remoteuseraccess and they MUST login using a suitable client eg WinSCP or similar. Web browser access does not support this type of usage (which will also permit file uploads to your sme server via FTP).


One last comment, use SFTP if you value your data & believe in security.

FTP & HTTP are different things, just google ftp vs http
You can do file downloads using http, but ftp may be better for larger files over say 70Mb.
For smaller files they are not significantly different with fast ADSL etc.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline LANMonkey

  • *****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Re: Problem solved, I think
« Reply #12 on: February 26, 2013, 06:38:14 PM »
LANMonkey

I have not used FTP for a Looong time as it is simply not secure, so maybe I forget a little.

For an ibay access, the user should be the ibayname & the password wil be the password you set particularly for that ibay.

Also you keep showing a URL of
ftp://username@www.symbiota.org
but you should be using
ftp://username@ftp.symbiota.org

I don't seem to need the "ftp" prefix to any of my domains to access those domains.

Also please answer
1 - have you enabled FTP access in Remote Access panel of server manager. You need to do this to enable the FTP server in sme

Yes, I checked and I have done that.

2 - If you want to lock authorised users into an ibay (ie jail them), then you need to use the smeserver-remoteuseraccess and they MUST login using a suitable client eg WinSCP or similar. Web browser access does not support this type of usage (which will also permit file uploads to your sme server via FTP).


One last comment, use SFTP if you value your data & believe in security.

FTP & HTTP are different things, just google ftp vs http
You can do file downloads using http, but ftp may be better for larger files over say 70Mb.
For smaller files they are not significantly different with fast ADSL etc.