FTP account creation through front end - linux

I am working on a file upload project where users will be able to upload large files. When the user creates/register as a member I want a FTP account to automatically be created on the server and the login information should be provided to the user.
I somehow need to be able to keep track on each users bandwidth, upload/download usage etc...
What would be a good and fairly secure way to accomplish this and how would you do it?
I am developing this project on a server running FreeBSD, using Django for the Web-development.
Appreciate your input...

You may use proftpd. It may use radius/mysql for users.
ProFTP site

Related

Nodejs send metrics of how many people are using my app

So i'm designing a new application with Nodejs and packaging into an executable then putting a release in github, I want to be able to monitor how many people are using my executable?
I was thinking about creating an api server and my application just make a call to that API service but I thought there might be something already out there any help?
The easiest way is to connect third party services that do that. The most famous one is Google Analytics
You just need to create your developer account and embed a few lines of tracking code. After that you can see full info about your visitors including their location.

How can you connect python to the Microsoft store and download an app?

I was wondering if there are modules, or code snippets to create a program that connects to the Microsoft store, in the background, and download an app(without pyAutoGUI). Thanks in advance.
There are no Official API's for accessing Microsoft store, A Possible solution is to use requests library or other equivalent to create a bot that can access various fields available on the website and navigate through, if you always want a certain(Same) application to be downloaded may be you can go directly to that links page and use get request for the download button as submit, this should work in theory, but again this will also keep breaking in short durations as Microsoft keeps making changes to it's website.
P.S. You might want to fool the website by adding headers to your request.

Get Windows user id in my node js so I can authenticate against ldap

I have developed a nodejs intranet linux application that can get a username/email/phone and other info based on the Windows user id from a corporate ldap directory. The user enters their Windows user id in the browser to access the application and then I do a simple lookup in the ldap directory. Of course they can enter any user id because I don't ask for password (not an option at the moment) so there is a hole there.
I would like to have the logged in Windows userid be passed to my nodejs (or at least have the ability to forward it to ldap to get the userid).
Where do I start? I have googled but I can't find any specific answers.
I have total control of of the intranet Linux server and if necessary i can implement an Apache/php solution.
I would also like this to be useable from Chrome/Firefox.
Thanks!
You can't get detailed environment information like that from within the browser's javascript sandbox. If anything, you'd probably have to end up relying on some browser plugin (whether you write one yourself or use java/flash/etc) to get the information for you.
There's an option to use Integrated Authentication with Apache and mod_auth_kerb.
See https://github.com/auth0/passport-windowsauth
I think SPNEGO could be useful for you.

Any other way of using .htaccess on yahoo server

One of my client has purchased server from yahoo hosting services for a year. I've made a website for him an downloaded a chatting script which i have to integrate into it.
On my chatting script it has more than one .htacccess files and as you already know that yahoo hosting does not allowed any file starting from . so does anyone knows about an alternative way of using .htaccess in yahoo hosting servers.
If they will not let you create the file, then no, there is no way to create the file.
Next time, pick hosting services that aren't from a giant faceless conglomerate and that expressly state that they support the thing that you are trying to do.

In IIS6, how to provide authenticated access to static files on remote server

We have a library of ZIP files that we would like to make available for download at an ASP.NET site.
The files are sitting on a NAS device that is accessible from out web farm.
Here is our initial strategy:
Map an IIS virtual directory to the shared drive at path /zipfiles
Users can download the zip files when given the URL
However, if users share links to the files, anyone can download them. We would instead like to make use of the ASP.NET forms authentication in our site to validate users' requests before initiating the file transfer.
A few problems:
A request for a zip file is handled by IIS, not ASP.NET. So it is not subject to forms authentication.
In addition, we don't want ASP.NET to handle the request, because it uses up an ASP.NET thread and is not scalable for download of large files. So, configuring the asp.net dll to handle *.zip requests is not an option.
Any ideas on this?
One idea we've tossed around is this:
Initial request for download will be for an ashx handler. This handler will, after authentication, generate a download token which is saved to a database. Then, the user is redirected to the file with token appended in QueryString (e.g. /files/xyz.zip?token=123456789). An ISAPI plugin will be used to check the token. Also, the token will expire after x amount of time.
Any thoughts on this? I have not implemented an ISAPI plugin so I'm not sure if this will even work.
I would like to avoid custom coding since security is an issue and I'd prefer to use a time-tested solution.
Forms authentication can't go without ASP.NET.
If you don't want to use ASP.NET at all, you can define an NTFS permission on file and to create domain accounts to your users. That will become a nightmare really fast.
To deal with large downloads into ASP.NET, you can take a look into Comet. That's basically a IHttpHandler but you'll need to use another ThreadPool (not ASP.NET). I suggest take a look into Smart Thread Pool.
I combined both a few months ago to create an application for download speed throttling and now runs very smoothly.
I read and understand your concern with using a handler to manage your static files, but if you use an async handler then you wont be blocking.
I think you might get the results you are looking for at a fair price.

Resources