Mailinglist Archive: opensuse (1620 mails)

< Previous Next >
Re: [opensuse] FTP Access
On 11/16/2014 12:21 PM, Lew Wolfgang wrote:
On 11/16/2014 06:18 AM, Anton Aylward wrote:
On 11/16/2014 08:55 AM, Carlos E. R. wrote:
On 2014-11-16 14:42, Anton Aylward wrote:

But not upload.:-)

Yes you can.
We see plenty of web sites that allow uploading!
Thing, for example of webmail sites that allow you to attach a
photograph from your PC (or dating sites similar).

Ok, right, true. But I wouldn't know how to do that, quick, on my own
apache, without some coding. And then upload with a simple CLI command,
automated.
Off the top of my head, neither do I, so I google:

The HTML would be a simple form with a POST.
Of course the server has to have write permission, just as with the ftp
server, and there should be nothing in .htaccess (or selinux) that
prevents it.

Most people write CGI in PHP or Perl but there's no reason not to write
it in shell.


Right! Allow anyone to upload stuff to your server and use CGI! You could
even use the shell! What could possibly go wrong? (think ShellShock)

You are just so missing the point, or you are ignorant of the basics of
setting up/configuring a httpd server!

The CGI is there to generate the html and dispose of the uploaded file
and trigger other activity.

The web server and its modules takes care of issue like access control
and filtering. Q.v.

No-one is forcing you to use shell as a CGI. You can still use Perl or
PHP or Ruby or any one of a dozen other 'languages' that have been
developed for making life with web servers *and* services easier. You
have an amazing choice.



And important point that I keep emphasising to my clients is that with
web services you can do things that you can't do easily or reliably with
ftp, most notably 'other triggered actions'.

I had one client with high street stores and POS terminals that uploaded
and consolidated the logs from the POS terminals for marketing purposes
and though a chain of machines to the data centre. Four times a day,
top of the hour, the Tandem Non-Stop FTPd six files to the marketing
departments AIX machine and at quarter past the AIX ran a cron job that
merged them into the marketing database.

Only it all was done wrong wrong wrong.

I could have been programmed right, with 'flag files' and checking
timestamps, but it wasn't.

As an example I tried figuring out what it would take at each end to
make the file names unique, to add a 'all done" from the Tandem, to
ensure files never got over-written, the ensure files never got merged
into the database twice.

Then I tried doing the same with a HTTPD based version and 'triggers' as
part of the upload CGI. It was *SO* much simpler and clearer.


So yes, if _all_ you want to do is upload photos its not going to make a
difference, but of the ftp is part of business data flow, then using
httpd/cgi makes more sense.







--
A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting frowned upon?

--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups