Jumat, 13 Februari 2009

FTP Windows 2003 Server

Dalam sebuah artikel sebelumnya kita melihat bahwa Internet Information Services 6 (IIS 6) adalah platform yang kuat untuk membangun dan hosting situs web untuk internet dan intranet korporat. IIS 6 is also equally useful for setting up FTP sites for either public or corporate use, and in this article we''ll walk through the process of creating and configuring FTP sites using both the GUI (IIS Manager) and scripts included in Windows Server 2003. IIS 6 juga sama-sama berguna untuk menyiapkan situs FTP baik untuk umum atau menggunakan perusahaan, dan dalam artikel ini we''ll berjalan melalui proses membuat dan mengkonfigurasi situs FTP menggunakan GUI (IIS Manager) dan skrip termasuk dalam Windows Server 2003. The specific tasks we''ll walk through in this article are: Spesifik tugas berjalan melalui we''ll dalam artikel ini adalah:

  • Creating an FTP Site Menciptakan FTP Site
  • Controlling Access to an FTP Site Pengendalian akses ke FTP Site
  • Configuring FTP Site Logging Konfigurasi FTP Situs Logging
  • Stopping and Starting FTP Sites Memulai dan menghentikan FTP Situs
  • Implementing FTP User Isolation Pelaksana FTP Pengguna Isolasi

For sake of interest, we''ll again explain these tasks in the context of a fictitious company called TestCorp as it deploys FTP sites for both its corporate intranet and for anonymous users on the Internet. Untuk demi kepentingan, we''ll menjelaskan kembali tugas ini dalam konteks sebuah perusahaan fiktif bernama TestCorp karena deploys FTP-nya untuk kedua situs intranet perusahaan dan untuk pengguna anonim di Internet.

Preliminary Steps Langkah-langkah awal

As mentioned in the previous article, IIS is not installed by default during a standard installation of Windows Server 2003, and if you installed IIS using Manage Your Server as described in the previous article this installs the WWW service but not the FTP service. Seperti yang disebutkan dalam artikel sebelumnya, IIS tidak terinstal secara default saat instalasi standar Windows Server 2003, dan jika Anda menggunakan IIS terinstal Kelola Server Anda seperti yang dijelaskan dalam artikel ini sebelumnya menginstall WWW layanan tetapi bukan layanan FTP. So before we can create FTP sites we first have to install the FTP service on our IIS machine. Jadi sebelum kami dapat membuat situs FTP pertama kita harus memasang layanan FTP di IIS mesin. To do this, we need to add an additional component to the Application Server role we assigned our machine when we used Manage Your Server to install IIS. Untuk melakukan ini, kita perlu menambahkan komponen tambahan untuk Application Server peran kita ditugaskan kita apabila kita menggunakan mesin Manage Your Server untuk menginstal IIS.

Begin by opening Add or Remove Programs in Control Panel and selecting Add/Remove Windows Components. Mulai membuka Tambah atau Hapus Program di Control Panel dan pilih Add / Remove Windows Components. Then select the checkbox for Application Server: Kemudian pilih checkbox untuk Aplikasi Server:

Click Details and select the checkbox for Internet Information Services (IIS): Detail klik dan pilih kotak centang untuk Internet Information Services (IIS):

Click Details and select the checkbox for File Transfer Protocol (FTP) Services. Detail klik dan pilih kotak centang untuk File Transfer Protocol (FTP) Service.

Click OK twice and then Next to install the FTP service. Klik OK dua kali, kemudian Next untuk menginstal layanan FTP. During installation you''ll need to insert your Windows Server 2003 product CD or browse to a network distribution point where the Windows Server 2003 setup files are located. Selama instalasi you''ll Anda perlu memasukkan produk Windows Server 2003 CD atau browsing ke jaringan distribusi titik di mana Windows Server 2003 Setup file berada. Click Finish when the wizard is done. Klik Selesai ketika wizard selesai.

Creating an FTP Site Menciptakan FTP Site

As with web sites, the simplest approach to identifying each FTP site on your machine is to assign each of them a separate IP address, so let''s say that our server has three IP addresses (172.16.11.210, 172.16.11.211 and 172.16.11.212) assigned to it. Seperti pada situs web, pendekatan yang sederhana untuk mengidentifikasi setiap situs FTP pada mesin Anda adalah untuk menetapkan masing-masing alamat IP yang terpisah, sehingga mengatakan bahwa let' dari server kami memiliki tiga alamat IP (172.16.11.210, 172.16.11.211 dan 172,16 .11.212) yang ditugaskan untuk itu. Our first task will be to create a new FTP site for the Human Resources department, but before we do that let''s first examine the Default FTP Site that was created when we installed the FTP service on our machine. Tugas pertama kami akan membuat situs baru FTP untuk departemen Sumber Daya Manusia, tetapi sebelum kita lakukan let' yang pertama meneliti Default FTP Site yang telah dibuat ketika kita menginstal FTP layanan pada mesin kami. Open IIS Manager in Administrative Tools, select FTP Sites in the console tree, and right-click on Default FTP Site and select Properties: Buka IIS Manager pada Administrative Tools, pilih FTP Situs di konsol pohon, dan klik-kanan pada Default FTP Site dan pilih Properties:

Just like the Default Web Site, the IP address for the Default FTP Site is set to All Unassigned. Seperti Default Web Site, alamat IP untuk FTP Site default diatur ke Semua Unassigned. This means any IP address not specifically assigned to another FTP site on the machine opens the Default FTP Site instead, so right now opening either ftp://172.16.11.210, ftp://172.16.11.211 or ftp://172.16.11.212 in Internet Explorer will display the contents of the Default FTP Site. Ini berarti tidak ada alamat IP yang ditugaskan secara khusus untuk situs FTP lain pada mesin membuka Default FTP Site gantinya, jadi sekarang membuka ftp://172.16.11.210 baik, ftp://172.16.11.211 atau ftp://172.16.11.212 di Internet Explorer akan menampilkan isi default FTP Site.

Let''s assign the IP address 172.16.11.210 for the Human Resources FTP site and make D:\HR the folder where its content is located. Let' dari menetapkan alamat IP 172.16.11.210 untuk Sumber Daya Manusia dan membuat situs FTP D: \ HR folder dimana isinya berada. To create the new FTP site, right-click on the FTP Sites node and select New --> FTP Site. Untuk membuat situs FTP yang baru, klik-kanan pada FTP Situs node dan pilih New -> FTP Site. This starts the FTP Site Creation Wizard. Ini dimulai pada FTP Site Creation Wizard. Click Next and type a description for the site: Klik Next, dan keterangan untuk jenis situs:

Click Next and specify 172.16.11.210 as the IP address for the new site: Klik Next, dan tentukan 172.16.11.210 sebagai alamat IP untuk situs baru:

Click Next and select Do not isolate users, since this will be a site that anyone (including guest users) will be free to access: Klik Next, dan pilih Jangan mengisolasi pengguna, karena ini akan menjadi situs yang ada (termasuk tamu user) akan bebas untuk mengakses:

Click Next and specify C:\HR as the location of the root directory for the site: Klik Next dan menentukan C: \ HR sebagai lokasi direktori root untuk situs:

Click Next and leave the access permissions set at Read only as this site will only be used for downloading forms for present and prospective employees: Klik Next dan membiarkan akses menetapkan hanya sebagai Baca di situs ini hanya akan digunakan untuk men-download formulir untuk hadir dan calon karyawan:

Click Next and then Finish to complete the wizard. Klik Next dan kemudian Finish untuk menyelesaikan wizard. The new Human Resources FTP site can now be seen in IIS Manager under the FTP Sites node: Sumber Daya Manusia yang baru FTP situs sekarang dapat dilihat di IIS Manager FTP Sites di bawah node:

To view the contents of this site, go to a Windows XP desktop on the same network and open the URL ftp://172.16.11.210 using Internet Explorer: Untuk melihat isi dari situs ini, pergi ke desktop Windows XP pada jaringan yang sama dan buka URL ftp://172.16.11.210 menggunakan Internet Explorer:

Note in the status bar at the bottom of the IE window that you are connected as an anonymous user. Catatan di bar status pada bagian bawah jendela IE yang Anda tersambung sebagai pengguna anonim. To view all users currently connected to the Human Resources FTP site, right-click on the site in Internet Service Manager and select Properties, then on the FTP Site tab click the Current Sessions button to open the FTP User Sessions dialog: Untuk melihat semua pengguna saat ini terhubung dengan Sumber Daya Manusia situs FTP, klik kanan di situs di Internet Service Manager dan pilih Properties, kemudian di FTP Site tab klik tombol Peristiwa Sesi membuka FTP Pengguna Sesi dialog:

Note that anonymous users using IE are displayed as IEUser@ under Connected Users. Perlu diketahui bahwa pengguna anonim menggunakan IE akan ditampilkan sebagai IEUser @ Hubungkan User bawah.

Now let''s create another FTP site using a script instead of the GUI. Sekarang let' dari membuat situs FTP lain menggunakan skrip bukan GUI. We''ll create a site called Help and Support with root directory C:\Support and IP address 172.16.11.211: We''ll membuat situs Bantuan dan Dukungan disebut dengan root direktori C: \ Dukungan dan alamat IP 172.16.11.211:

Here's the result of running the script: Berikut adalah hasil dari menjalankan script:

The script we used here is Iisftp.vbs , which like Iisweb.vbs and Iisvdir.vbs which we discussed in the previous article is one of several IIS administration scripts available when you install IIS on Windows Server 2003. Script yang kita gunakan di sini adalah Iisftp.vbs, seperti yang Iisweb.vbs dan Iisvdir.vbs apa yang kita diskusikan di artikel sebelumnya adalah salah satu dari beberapa skrip administrasi IIS tersedia saat Anda menginstal IIS pada Windows Server 2003. A full syntax for this script can be found here . Lengkap sintaks untuk script ini dapat ditemukan di sini. Once you create a new FTP site using this script you can further configure the site using IIS Manager in the usual way. Setelah Anda membuat situs baru FTP menggunakan script ini anda dapat lebih mengkonfigurasi situs menggunakan IIS Manager pada jalan yang biasa.

Note : At this point you could add structure to your FTP site by creating virtual directories, and this is done in the same way as was described in the previous article for working with web sites. Catatan: Pada titik ini Anda bisa menambah struktur ke situs FTP Anda dengan menciptakan virtual direktori, dan ini dilakukan dengan cara yang sama seperti yang dijelaskan dalam artikel sebelumnya untuk bekerja sama dengan situs web.

Controlling Access to an FTP Site Pengendalian akses ke FTP Site

Just like for web sites, there are four ways you can control access to FTP sites on IIS: NTFS Permissions, IIS permissions, IP address restrictions, and authentication method. Sama seperti untuk situs web, terdapat empat cara untuk mengontrol akses ke situs-situs FTP di IIS: NTFS Permissions, IIS perizinan, pembatasan alamat IP, dan metode otentikasi. NTFS permissions are always your first line of defense but we can't cover them in detail here. NTFS permissions selalu Anda baris pertama pertahanan tetapi kami tidak dapat menutupi mereka secara rinci di sini. IIS permissions are specified on the Home Directory tab of your FTP site's properties sheet: IIS perizinan ditetapkan pada tab Home Directory Anda FTP situs properti lembar:

Note that access permissions for FTP sites are much simpler (Read and Write only) than they are for web sites, and by default only Read permission is enabled, which allows users to download files from your FTP site. Perlu diketahui bahwa akses untuk situs FTP yang lebih sederhana (Baca Tulis dan hanya) dari mereka adalah untuk situs Web, dan secara default hanya Baca izin diaktifkan, yang memungkinkan pengguna untuk men-download file dari situs FTP Anda. If you allow Write access, users will be able to upload files to the site as well. Jika Anda mengizinkan Write akses, pengguna akan dapat meng-upload file ke situs juga. And of course access permissions and NTFS permissions combine the same way they do for web sites. Dan tentu saja akses dan izin NTFS menggabungkan dengan cara yang sama mereka lakukan untuk situs web.

Like web sites, IP address restrictions can be used to allow or deny access to your site by clients that have a specific IP address, an IP address in a range of addresses, or a specific DNS name. Seperti situs web, pembatasan alamat IP dapat digunakan untuk membolehkan atau menolak akses ke situs anda oleh klien yang memiliki sebuah alamat IP, alamat IP dalam rentang alamat, atau nama DNS tertentu. These restrictions are configured on the Directory Security tab just as they are for web sites, and this was covered in the previous article so we won't discuss them further here. Pembatasan yang dikonfigurasi pada tab Keamanan Direktori hanya karena mereka adalah untuk situs Web, dan ini telah dibahas dalam artikel sebelumnya, jadi kami tidak akan membahas mereka lebih lanjut di sini.

FTP sites also have fewer authentication options than web sites, as can be seen by selecting the Security Accounts tab: Situs FTP juga memiliki pilihan yang lebih sedikit daripada otentikasi situs web, seperti yang dapat dilihat dengan memilih tab Account Keamanan:

By default Allow anonymous connections is selected, and this is fine for public FTP sites on the Internet but for private FTP sites on a corporate intranet you may want to clear this checkbox to prevent anonymous access to your site. Secara default Allow anonymous sambungan yang dipilih, dan ini berlaku untuk umum situs FTP di Internet tetapi untuk pribadi FTP pada situs intranet perusahaan Anda mungkin ingin membersihkan ini anonim centang untuk mencegah akses ke situs Anda. Clearing this box has the result that your FTP site uses Basic Authentication instead, and users who try to access the site are presented with an authentication dialog box: Membersihkan kotak ini memiliki hasil yang situs FTP Anda menggunakan Otentikasi Dasar sebagai gantinya, dan pengguna yang mencoba untuk mengakses situs ini disajikan dengan otentikasi kotak dialog:

Note that Basic Authentication passes user credentials over the network in clear text so this means FTP sites are inherently insecure (they don't support Windows integrated authentication). Perlu diketahui bahwa Dasar Otentikasi melewati surat kepercayaan pengguna melalui jaringan di jelas sehingga teks ini berarti situs FTP inherently aman (mereka tidak mendukung Windows terintegrasi otentikasi). So if you're going to deploy a private FTP site on your internal network make sure you close ports 20 and 21 on your firewall to block incoming FTP traffic from external users on the Internet. Jadi jika Anda akan menggunakan situs FTP pribadi pada jaringan internal Anda pastikan Anda menutup port 20 dan 21 pada firewall untuk memblokir lalu lintas masuk FTP eksternal dari pengguna di Internet.

Configuring FTP Site Logging Konfigurasi FTP Situs Logging

As with web sites, the default logging format for FTP sites is the W3C Extended Log File Format, and FTP site logs are stored in folders named Seperti pada situs web, default format log untuk FTP adalah situs W3C Extended Log Format File, dan situs FTP log disimpan dalam folder bernama

%SystemRoot%\system32\LogFiles\MSFTPSVCnnnnnnnnnn % SystemRoot% \ system32 \ LogFiles \ MSFTPSVCnnnnnnnnnn

where nnnnnnnnnn is the ID number of the FTP site. dimana nnnnnnnnnn adalah nomor ID dari situs FTP. And just as with web sites, you can use the Microsoft Log Parser, part of the IIS 6.0 Resource Kit Tools , to analyze these FTP site logs. Dan sama seperti situs web, anda dapat menggunakan Microsoft Log parser, bagian dari 6,0 IIS Resource Kit Tools, menganalisis situs ini FTP log.

Stopping and Starting FTP Sites Memulai dan menghentikan FTP Situs

If an FTP site becomes unavailable you may need to restart it to get it working again, which you can do using IIS Manager by right-clicking on the FTP site and selecting Stop and then Start. Jika tidak tersedia menjadi situs FTP Anda mungkin perlu kembali ke mendapatkannya bekerja kembali, yang dapat Anda lakukan dengan menggunakan IIS Manager oleh klik kanan di situs FTP dan kemudian memilih Berhenti Mulai. From the command-line you can type net stop msftpsvc followed by net start msftpsvc or use iisreset to restart all IIS services. Dari baris perintah, Anda dapat menghentikan msftpsvc jenis bersih diikuti oleh msftpsvc mulai bersih atau menggunakan iisreset restart IIS semua layanan. Remember that restarting an FTP site is a last resort as any users currently connected to the site will be disconnected. Ingat bahwa restart sebuah situs FTP adalah jalan terakhir sebagai pengguna saat terhubung ke situs akan diputuskan.

Implementing FTP User Isolation Pelaksana FTP Pengguna Isolasi

Finally, let's conclude by looking at how to implement the new FTP User Isolation feature of IIS in Windows Server 2003. Terakhir, mari kita menyimpulkan dengan melihat cara baru untuk menerapkan FTP Pengguna Isolasi fitur IIS di Windows Server 2003. When an FTP site uses this feature, each user accessing the site has an FTP home directory that is a subdirectory under the root directory for the FTP site, and from the perspective of the user their FTP home directory appears to be the top-level folder of the site. Ketika sebuah situs FTP menggunakan fitur ini, setiap pengguna yang mengakses situs FTP memiliki direktori home yang subdirektori di bawah direktori root untuk situs FTP, dan dari perspektif pengguna FTP direktori home mereka muncul untuk menjadi tingkat atas folder dari situs. This means users are prevented from viewing the files in other users' FTP home directories, which has the advantage of providing security for each user's files. Ini berarti pengguna dicegah dari melihat file dalam user lain FTP direktori home, yang memiliki keuntungan dari memberikan keamanan untuk setiap pengguna file.

Let's create a new FTP site called Staff that makes use of this new feature, using C:\Staff Folders as the root directory for the site and 172.16.11.212 for the site's IP address. Mari kita membuat sebuah situs FTP yang disebut Staf yang menggunakan fitur baru ini, dengan menggunakan C: \ Folder Staf sebagai direktori root untuk situs dan 172.16.11.212 untuk situs dari alamat IP. Start the FTP Site Creation Wizard as we did previously and step through it until you reach the FTP User Isolation page and select the Isolate users option on this page: Memulai FTP Site Creation Wizard seperti yang kita lakukan sebelumnya dan melalui langkah ini sampai Anda mencapai halaman FTP Pengguna Isolasi dan mengisolasi pengguna memilih pilihan di halaman ini:

Continue with the wizard and be sure to give users both Read and Write permission so they can upload and download files. Lanjutkan dengan wizard dan pastikan untuk memberikan pengguna kedua Membaca dan Message izin agar mereka dapat meng-upload dan download file.

Now let's say you have two users, Bob Smith (bsmith) and Mary Jones (mjones) who have accounts in a domain whose pre-Windows 2000 name is TESTTWO. Sekarang mari kita berkata Anda memiliki dua pengguna, Bob Smith (bsmith) dan Mary Jones (mjones) yang ada di account domain yang pra-Windows 2000 adalah nama TESTTWO. To give these users FTP home directories on your server, first create a subfolder named \TESTTWO beneath \Staff Folders (your FTP root directory). Memberikan pengguna FTP rumah direktori pada server Anda, terlebih dahulu membuat subfolder bernama \ TESTTWO bawah \ Staff Folder (FTP Anda root direktori). Then create subfolders \bsmith and \mjones beneath the \Accounts folder. Kemudian membuat subfolder \ bsmith dan \ mjones bawah \ Akun folder. Your folder structure should now look like this: Struktur folder Anda sekarang harus terlihat seperti ini:

C:\Staff Folders C: \ Folder Staff
\TESTTWO \ TESTTWO
\bsmith \ bsmith
\mjones \ mjones

To test FTP User Isolation let's put a file name Bob's Document.doc in the \bsmith subfolder and Mary's Document.doc in the \mjones subfolder. Untuk menguji FTP Isolasi Pengguna mari kita masukkan nama file Bob Document.doc di \ bsmith subfolder dan Mary Document.doc di \ mjones subfolder. Now go to a Windows XP desktop and open Internet Explorer and try to open ftp://172.16.11.212, which is the URL for the Staff FTP site we just created. Sekarang masuklah ke Windows XP desktop dan buka Internet Explorer dan mencoba untuk membuka ftp://172.16.11.212, yang adalah URL untuk situs FTP Staff kami hanya dibuat. When you do this an authentication dialog box appears, and if you're Bob then you can enter your username (using the DOMAIN\username form) and password like this: Bila Anda melakukan ini sebuah kotak dialog otentikasi muncul, dan jika Anda Bob maka anda dapat memasukkan nama pengguna Anda (menggunakan DOMAIN \ username formulir) dan password seperti ini:

When Bob clicks the Log On button the contents of his FTP home directory are displayed: Bob ketika mengklik tombol Log On isi direktori home nya FTP ditampilkan:

Note that when you create a new FTP site using FTP User Isolation, you can't convert it to an ordinary FTP site (one that doesn't have FTP User Isolation enabled). Perhatikan bahwa ketika Anda membuat situs baru FTP menggunakan FTP Pengguna Isolasi, Anda tidak dapat dikonversi ke sebuah situs FTP biasa (yang tidak ada FTP Pengguna Isolasi diaktifkan). Similarly, an ordinary FTP site can't be converted to one using FTP User Isolation. Demikian pula, sebuah situs FTP biasa tidak dapat dikonversi ke satu menggunakan FTP Pengguna Isolasi.

We still need to explore one more option and that's the third option on the FTP User Isolation page of the FTP Site Creation Wizard, namely Isolate users using Active Directory. Kita masih perlu mencari satu lagi pilihan dan yang ketiga pilihan pada halaman FTP Pengguna Isolasi dari FTP Site Creation Wizard, yaitu mengisolasi pengguna menggunakan Active Directory. Since we've run out of IP addresses let's first delete the Help and Support FTP site to free up 172.16.11.211. Karena kita telah kehabisan alamat IP pertama mari kita hapus Bantuan dan Dukungan situs FTP untuk membebaskan 172.16.11.211. One way we can do this is by opening a command prompt and typing iisftp /delete "Help and Support" using the iisftp.vbs command script. Salah satu cara yang dapat kita lakukan ini adalah dengan membuka command prompt dan mengetik iisftp / menghapus "Bantuan dan Dukungan" iisftp.vbs menggunakan perintah script. Then start the FTP Site Creation Wizard again and select the third option mentioned above (we'll name this new site Management): Kemudian memulai FTP Site Creation Wizard lagi dan pilih pilihan yang ketiga yang disebutkan di atas (kami akan nama baru ini situs Manajemen):

Click Next and enter an administrator account in the domain, the password for this account, and the full name of the domain: Klik Next, dan masukkan account administrator di domain, password untuk account ini, dan seluruh nama domain:

Click Next and confirm the password and complete the wizard in the usual way. Klik Next dan mengkonfirmasikan sandi dan melengkapi wizard di cara biasa. You'll notice that you weren't prompted to specify a root directory for the new FTP site. Anda akan melihat bahwa Anda tidak diminta untuk menentukan direktori root yang baru untuk situs FTP.

0 komentar: