Tech Site & Blog Blog about technology & programming

Archive for category Windows


11Mar/100

ext2 and ext3 on Windows

If you are using dual boot with Windows and Linux you've probably faced with a problem of accessing ext3 partitions from Windows OS.

Most of the Linux distributions come with NTFS-3G driver, which allow reading & writing to NTFS partiton. Sadly, Windows doesn't offer such filesystem driver for file systems other than FAT16/32 and NTFS.

However, you can use the 3rd party driver such as Ext2 IFS, which allows OS Windows to access such partitions from any program including Windows Explorer.

Ext2 IFS
Ext2 IFS is a freeware program that provides Windows NT4.0/2000/XP/2003/Vista/2008 with full access to ext2/ext3 partitions.

Info: http://www.fs-driver.org/
Download: http://www.fs-driver.org/download.html

I've no problems with accessing partitions with inode size of 128 bytes. However, this program does not support partitions with bigger inode size, which can be a problem in some cases.


Ext2Fsd
If you have a partition with inode size of 256 bytes, you can use this file system driver, which supports Windows NT/2K/XP/VISTA, X86/AMD64.

Info: http://www.ext2fsd.com/
Download: http://sourceforge.net/projects/ext2fsd/files/

Just a word of caution: It is not a good idea to have multiple file system drivers (for the same file system) installed at the same time. Try one and if you have a problem with it, delete it, restart operating system and install another one.

Web sites of both drivers claim that they are not supported by Windows 7. In my case everything worked well on Windows 7 32 bit and 64 bit.
21Feb/100

MS SQL Add User

The simplest way to add user to MySQL and grant privileges for specific database.

1. Connect to MS SQL server using MS SQL Management Studio.

2. Click on the "New query" button in the toolbar on left.

3. Create a database
Type following query and execute it:
create database DATABASE_NAME

Example:
create database MyCMS


3. Create login
create login LOGINNAME with password='PASSWORD'

Example:
create login MyCMSUser with password='abc123'


4. Create user
use DATABASE_NAME
create user USERNAME for login LOGINNAME

Example:
use MyCMS
create user MyCMSUser for login MyCMSUser


5. Grant control of the database to the created user
use DATABASE_NAME
grant control to USERNAME

Example:
use MyCMS
grant control to MyCMSUser


Executing example queries would create user MyCMSUser with password abcd123 with all privileges on database MyCMS.

Queries have to be executed from the first to the last.

If you want to find out how to create a user with MySQL read following post: MySQL Add User
25Sep/092

WordPress on IIS7

How to use WordPress blog's permalinks with IIS7 (or similar Content Management Systems)?

It's really simple to make this work on Apache server. Just copy 5 lines of code to .htaccess file.

But it's a little bit harder to do so on IIS7. You have 2 options:

- use IIS7 GUI to create rules

- modify Web.Config by hand

Code for Web.Config:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="RewriteUserFriendlyURL1" patternSyntax="Wildcard" stopProcessing="true">
<match url="*" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

Explanation:

1. IIS tries to match requested url with * (everything).

2. If match is found, IIS checks if there is a file with the same url that is requested.

3. Then IIS checks if there is a directory with that name.

4. If there is no file/directory with that name, IIS rewrites url to "index.php".