Scribblings of a TechnoBuff

Exchange IIS ASP.NET OCS Sharepoint Windows

Archive for the ‘IIS’ Category

Setup groups and users in FileZilla Server and connect with ftpes

Posted by Sujeeth on October 30, 2009

Following my earlier post on how to Install and configure an FTP server, this post describes on how to setup groups and users in FileZilla.

Open the FileZilla Server console by clicking on the taskbar icon.

Choose Edit->Groups->Add


 

Create a folder on one of your drives called Filezilla. Create a subfolder called clients. After the group has been added in the FileZilla console, select the group and configure it as follows

The path will be F:\Filezilla\clients\:u

:u represents to automatically select the subfolder based on the login username.

H represents the Home folder

Eg: If you create a folder as F:\Filezilla\clients\sujeeth, then the client with username ‘sujeeth’ will be automatically be mapped to that folder and it will be that login’s home folder.

 

To create an Alias, Click on Add and give local path. Right click on the path and select Edit aliases. So when the client login, they will see a folder called website, and when they upload the files, it will be stored in C:\autopublish

 

You can set the Speed Limits and IP Filter based on your requirements. After you create the group, you follow the same procedure to add the users. Any user that is member of a group will inherit all the settings of that group.

 

After you have setup the user, you can connect using FileZilla client on the remote machine with the following syntax

ftpes://<username>:<password>@<host IP address>/

eg: ftpes://sujeeth:pa55w0rd@207.46.222.11/

You have to use ftpes protocol because you have configured the FileZilla Server to force explicit SSL as per my previous post

 

Posted in IIS, Systems, Windows Servers | Tagged: , | 13 Comments »

Install and Configure FTP Secure (FTPS) or FTP-SSL using FileZilla

Posted by Sujeeth on September 16, 2009

I am going to show you how to setup an FTP Secure (FTPS protocol) on Windows Server 2003 and have your own version of FTP server rather than default ftp in IIS.

FTPS should not be confused with the SSH File Transfer Protocol (SFTP), an incompatible secure file transfer subsystem for the Secure Shell (SSH) protocol. It is also different from Secure FTP, the practice of tunneling FTP through an SSH connection.

Please make sure you don’t have IIS FTP service enabled and running. If you have it running, please disable FTP service as we are going to use the same ports as a standard FTP

Download the latest version of FileZilla Server. At the time of writing, it was 0.9.33

Choose Standard install and proceed. This will install the Windows service for FileZilla and the GUI for administration.

After the Installation is completed, it is now to configuring the server. To start the Administration interface, Connect to 127.0.0.1 which is localhost on Port 10050 (you have given this during installation)


Setup your server as per the images. They are self explanatory.

We are going to have the FTP Secure to listen on port 21 which is the default FTP port.

Setup your own customised welcome message when the users logs in. Make sure you select to hide the message in log, because this might increase the log size.

Use * to bind all IP addresses on the local system. If your server has multiple IP addresses assigned, provide only the IP that you want to use

To have better control over security, Ban all IP addresses to connect and include only the IP address in the exclude list that want to connect. Separate the IP address with a space. Here I allowed google.com IP (209.85.229.103)

The next few settings are straight forward:

Enable logging to see who the usage and also enable deletion of older log files or else you will end up requiring huge disk space

Here you can set the download and upload speed limits if you wish to. Note that these limits are global settings, so they will take over individual user settings.

This is the main part where we configure an SSL certificate to set our server as FTPS. You can use a public certificate which you need to purchase. But for the demo purposes, I am going to use inbuilt certificate generator.

Provide your server IP address in the Common name

Go back to SSL/TLS settings and give the path to the generated certificate and a key password

And finally Autoban settings and we are done with Server Configuration.

Before you proceed to connect, make sure port 21, 990 and 3000-4000 are allowed on your firewall. This is very important.

In my next post, I will show how to setup groups and users in FileZilla Server and connect using FileZilla Client.

Posted in IIS, Systems, Windows Servers | Tagged: , , , , | 10 Comments »

MOSS 2007 Maintenance and Trace logs Removal

Posted by Sujeeth on March 25, 2008

By default, Office SharePoint Server 2007 trace logging is enabled in Central Administration > Operations > Diagnostic Logging and the log files are stored at C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\LOGS on your front-end web server.
ManagingMOSS

Without changing the verbosity of logging via event throttling settings, or the number of minutes before creating a new log file, each log file is around 50 MB. By default, MOSS keeps 48 of these files, spanning 2 days for a grand total of around 2.4 GB.

I have changed the default path location to a different drive in the Trace Log section and decrease the number of log files to 12 to be used for 24hrs(1440 min).

Here are the settings on the diagnostic logging page:
Diagnostic Logging

The log file related to SharePoint_Config database can grow to huge sizes without a maintenance plan, or at the very least setting databases to backup in “simple” mode will dramatically reduce the size of the logs.

MOSS 2007 server installation has a log file called WSS_AdminService.log held in C:\Documents and Settings\Default User\Local Settings\Temp. This is just a log file and it is being written at regular intervals increasing its size. Worse still, because it’s in the C:\Documents and Settings\Default User folder it gets duplicated when a new user logs onto the server console. You can safely delete this file.

The following is a C# console application code which can make the administrator work easier. Administrator can create the console application using the following code and schedule it every alternate day to delete the above mentioned logs automatically. This way you can keep your server disk usage low.
—————————————–

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using System.ComponentModel;
  5. using System.Runtime.InteropServices;
  6. namespace TemporaryFilesRemoval
  7. {
  8.     class Program
  9.     {
  10.         /// <summary>
  11.         /// The main entry point for the application.
  12.         /// </summary>
  13.         [STAThread]
  14.         static void Main(string[] args)
  15.         {
  16.             Console.Title = “Temporary LOG Files Removal”;
  17.             DeleteFiles(“C:\\Program Files\\Common Files\\Microsoft Shared\\web server extensions\\12\\LOGS”, “*.log”);
  18.             DeleteFolder(“C:\\Program Files\\Common Files\\Microsoft Shared\\web server extensions\\12\\LOGS”, “*.log”);
  19.             DeleteFiles(“D:\\Sharepoint Logs”, “*.log”);
  20.             DeleteFiles(“C:\\Documents and Settings\\Default User\\Local Settings\\Temp”, “*.log”);
  21.         }
  22.         static void DeleteFolder(string rootfolder, string filter)
  23.         {
  24.             try
  25.             {
  26.                 string[] directories = System.IO.Directory.GetDirectories(rootfolder);
  27.                 Console.WriteLine(string.Format(“Total {0} directories in {1}”, (directories.Length), rootfolder));
  28.                 foreach (string dir in directories)
  29.                 {
  30.                     DeleteFiles(dir, filter);
  31.                     DeleteFolder(dir, filter);
  32.                     try
  33.                     {
  34.                         Console.WriteLine(string.Format(“Deleting directory : {0}”, dir));
  35.                         System.IO.Directory.Delete(dir);
  36.                         Console.WriteLine(string.Format(“{0} has been deleted.”, dir));
  37.                     }
  38.                     catch (Exception ex)
  39.                     {
  40.                         Console.WriteLine(string.Format(“Error : {0}”, ex.Message));
  41.                         Console.WriteLine();
  42.                     }
  43.                 }
  44.             }
  45.             catch (Exception ex)
  46.             {
  47.                 Console.WriteLine(string.Format(“Error : {0}”, ex.Message));
  48.                 Console.WriteLine();
  49.             }
  50.         }
  51.         static void DeleteFiles(string folder, string filter)
  52.         {
  53.             string[] files = null;
  54.             try
  55.             {
  56.                 if (!string.IsNullOrEmpty(filter))
  57.                 {
  58.                     files = System.IO.Directory.GetFiles(folder, filter);
  59.                 }
  60.                 else
  61.                 {
  62.                     files = System.IO.Directory.GetFiles(folder);
  63.                 }
  64.                 Console.WriteLine(string.Format(“Total {0} file(s) in {1}”, (files.Length), folder));
  65.                 Console.WriteLine();
  66.                 foreach (string file in files)
  67.                 {
  68.                     Console.WriteLine(string.Format(“Deleting {0}”, file));
  69.                     System.IO.File.Delete(file);
  70.                     Console.WriteLine(string.Format(“{0} has been deleted.”, file));
  71.                     Console.WriteLine();
  72.                 }
  73.             }
  74.             catch (Exception ex)
  75.             {
  76.                 Console.WriteLine(string.Format(“Error : {0}”, ex.Message));
  77.                 Console.WriteLine();
  78.             }
  79.         }
  80.     }
  81. }
    —————————————–

I have included a word version of it here -LogClean or Alternatively http://technobuff.pastebin.com/f61f70e48

Please note that in the above code, I have also included my new path of trace logs i.e, (“D:\\Sharepoint Logs”, “*.log”);

You can also use the same application to clean up your Temporary ASP.NET Files. Just include the path, default will be C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files

DeleteFiles(“C:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727\\Temporary ASP.NET Files”, string.Empty);
DeleteFolder(“C:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727\\Temporary ASP.NET Files”, string.Empty);

Posted in IIS, Sharepoint, Systems, Windows Servers | Tagged: , , , , , | 11 Comments »

 
Follow

Get every new post delivered to your Inbox.