2009-10-28

bitvise ftp bridge for Windows

A new Windows SSH client has come onto the radar: Bitvise

Of particular interest is the FTP <-> SFTP (SSH) client-side bridging functionality of the Tunnelier SFTP software. This widget creates transparent, secured, tunneled bridging between standard Windows FTP client applications and SFTP (SSH) servers. This is something that's been needed for quite some time, imo.

See Using Tunnelier to Connect to an SFTP Server with an FTP Client (from bitvise).

AJAX PHP Javascript MySQL XML

Wacka-wacka DOOOO!

Today's brain teaser is AJAX + PHP + Javascript + XML + MySQL ... and there may be some others I've left out CSS, XHTML, stuff like that.

Nevertheless, we will prevail. Links to follow.^

Nothing specific to the MySQL side of this, for now.

2009-10-26

Fix Emacs Backspace Ctl-H

Put this in your .emacs file...

(global-set-key "\C-h" 'backward-delete-char)

2009-10-24

Dokan: FUSE SSHFS for Cygwin

Dokan appears to be a work in progress. Basically it is intended to allow users of Cygwin to connect a [secure] remote file system (using SSHFS) under Windows just as is possible under the *nixish operating systems & MacOS.

Note that the version of SSHFS we downloaded has a dependency on Microsoft Visual C++ 2005 SP1 Redistributable Package (x86)/ This dependency is documented on the Dokan Download Page.

Note that we are installing this under WinXP w/ all current service packs, Cygwin, and ActiveState Perl.

2009-10-19

WinXP and cPanel WebDisk

Connect a cPanel WebDisk under WinXP

The procedure describes how to add a "Network Place" to the "Network Places" folder under WinXP, using the SSL WebDisk utility description from and installed cPanel. The hostname given in the URL given shown here is 'host.example.com'. In order for this to work, you must have a real hostname OR an IP address for a server running whatever SSL WebDisk protocol WinXP understands, AND the server has installed. More information about this when it becomes available...

  1. On the "Map Network Drive" dialog, there is a link at the bottom, just above the buttons called "Sign up for online storage or connect to a network server" - use that -
  2. In the "Add Network Place Wizard select "Connect to another network server" to specify the URL of the web disk; click "Next"
  3. Provide the URL of the WebDisk as the "Internet or Network address" – the URL should be of the form https://host.example.com:2078/; Click "Next"
  4. Accept the security certificate; click "Next"
  5. Provide Login Credentials (Username & Password)
  6. Provide a name for the network place [I typically use something like username@hostname]; Click "Next"
  7. Click "Finish" on the "A network place has successfully been created" dialog. [this is the final dialog of the Wizard]

This will create a "Network Place" in your Network Places folder.

UPDATE

While this procedure did create a "Network Place", I later found that the filesystem of the remote computer was not writable by the Windows file system API calls (made by Windows Apps) [WinXP we're talking about]. No solution found, yet. -pdw 2009.10.28

2009-10-13

Sticky Bits

4000 (the setuid bit)
Executable files with this bit set will run with effective uid set to the uid of the file owner. Directories with this bit set will force all files and sub-directories created in them to be owned by the directory owner and not by the uid of the creating process, if the underlying file system supports this feature

see chmod(2) and the suiddir option to mount(8).

2009-09-26

Cricket Wireless Broadband

  1. From the DSL Linux box, ssh to :Host:CpsSony.
  2. Log in.
  3. At the Bash prompt, type ipconfig /all (note: this is a WinXP host)
PPP adapter Cricket Wireless:

        Connection-specific DNS Suffix  . : 
        Description . . . . . . . . . . . : WAN (PPP/SLIP) Interface
        Physical Address. . . . . . . . . : 00-53-45-00-00-00
        Dhcp Enabled. . . . . . . . . . . : No
        IP Address. . . . . . . . . . . . : 10.106.10.32
        Subnet Mask . . . . . . . . . . . : 255.255.255.255
        Default Gateway . . . . . . . . . : 10.106.10.32
        DNS Servers . . . . . . . . . . . : 172.28.221.53
                                            172.28.221.54
        NetBIOS over Tcpip. . . . . . . . : Disabled

2009-09-24

Host Environment for Pen Drive Development

Initial State / Pre-Conditions:  The Pen Drive is plugged in to the USB port of a host system - a discless workstation - running Damn Small Linux (DSL). Neither of the Pen Drive partitions are mounted.

  1. from the KNOPPIX Bash prompt, open a root shell
    dsl@box:~$ sudo su
    
  2. Dump the file system table (fstab) to the console
    [/home/dsl]# cat /etc/fstab
    /proc      /proc       proc   defaults            0 0
    /sys       /sys        sysfs  noauto              0 0
    /dev/pts   /dev/pts    devpts mode=0622           0 0
    /dev/fd0   /mnt/auto/floppy auto   user,noauto,exec,umask=000    0 0
    /dev/cdrom /mnt/auto/cdrom  auto   user,noauto,exec,ro 0 0
    /dev/cdrom1 /mnt/auto/cdrom1  auto   users,noauto,exec,ro 0 0
    # Added by KNOPPIX
    /dev/sda1 /mnt/sda1 vfat noauto,users,exec,umask=000,uid=1001,gid=50 0 0
    # Added by KNOPPIX
    /dev/sda2 /mnt/sda2 ext2 noauto,users,exec 0 0
    
  3. Dump the list of currently mounted file systems
    [/home/dsl]# mount
    /dev/root on / type ext2 (rw)
    /dev/scd1 on /cdrom type iso9660 (ro)
    /dev/cloop on /KNOPPIX type iso9660 (ro)
    /ramdisk on /ramdisk type tmpfs (rw,size=147296k,size=145084k)
    /proc/bus/usb on /proc/bus/usb type usbdevfs (rw,devmode=0666)
    unionfs on /KNOPPIX/bin type unionfs (rw,dirs=/ramdisk/bin=rw:/bin=ro)
    unionfs on /dev type unionfs (rw,dirs=/ramdisk/dev=rw:/dev=ro)
    

Using the host system described by the system parameters shown above, perform the following steps:

  1. mount the /dev/sdx1 & /dev/sdx2 partitions
        # mount /dev/sda1
        # mount /dev/sda2
    
    This mounts the pendrive partions on /mnt/sda1 & /mnt/sda2, respectively.

    Note that – following this operation – /mnt/sda1 is the DOS FAT16 format (750M) partition, and /mnt/sda2 is the Linux ext3 formatted partition (3.25G).

  2. copy the /KNOPPIX & /boot/isolinux/* directory trees from the CD ISO image to the pendrive DOS partition (/dev/sdx1).
        # cp -rf KNOPPIX boot/isolinux/* /mnt/sda1
    
  3. rename the isolinux.cfg file in on the sdx1 to be syslinux.cfg
        # cd /mnt/sda1
        # mv isolinux.cfg syslinux.cfg
    
  4. unmount the DOS FAT 16 partition (/dev/sdx1).
        # cd
        # umount /dev/sda1
    
  5. Install the SYSLINUX DOS filesystem bootloader to the FAT16 pendrive partition
        #syslinux -sf /dev/sdx1
    

Pen Drive KNOPPIX Roll-back

SanDisk Cruzer USB pendrive
 Partition 1:  750M FAT16
 Partition 2:  3.25G ext3

 Host Computer: dslbox DSL

Ref1: 
 Instructions for persistent USB pendrive KNOPPIX 5.1.1 install
 <http://www.pendrivelinux.com/installing-usb-knoppix-51-using-linux/#>

The pendrive is already formatted according to the procedure given in
 Ref1 [NOTE: the KNOPPIX currently installed on 
the pendrive partition one is KNOPPIX v6.0.1]

The KNOPPIX 5.1.1 CD ISO image is stored on the pendrive's partition 2 
(the linux partition) as an ISO (*.iso) file.

In order to copy the files from the ISO image stored on partition 2 to the
 file system on partition 1 of the USB pendrive, we will mount the ISO image
 using the loopback device.

Once we have mounted both the pendrive partitions under the DSL host filesystem, 
we can pick up the procedure in Ref1 at step 15
(NOTE: substitute device and directory names as follows:

 /dev/sdx1 - pendrive partition 1
 /dev/sdx2 - pendrive partition 2

 /tmp/usb   - mount point for /dev/sdx1
 /tmp/sdx2  - mount point for /dev/sdx2

 /tmp/sdx2/knoppix-v5.1.1-cd.iso - CD ISO file
 /tmp/cdrom - mount point for CD ISO file

The command to mount the CD ISO file as a file system is

 mount file.iso /cdrom -t iso9660 -o loop

(from <http://thomer.com/howtos/mount_loopback.html>)

... so in this case the command will be ...

  mount /tmp/sdx2/knoppix-v5.1.1-cd.iso /tmp/cdrom -t iso9660 -o loop

This will cause the file system stored in the ISO file to be mounted at
/tmp/cdrom in such a way that the files and directories look like a standard
linux file system from the Bash prompt under DSL. 


Copy the KNOPPIX 5.1.1 system from the ISO image to partition 1 of the 
USB pendrive as per the instructions in Ref1.

# Type cd /tmp/cdrom
# Type cp -rf KNOPPIX boot/isolinux/* /tmp/usb
# Type cd /tmp/usb
# Type mv isolinux.cfg syslinux.cfg
# Type cd
# Type umount /tmp/usb
# Type syslinux -sf /dev/sdx1

# Reboot your computer and set your system BIOS or Boot Menu to boot
 from the USB device. Save your changes and restart your PC, booting
 from the USB device.

2009-09-23

KNOPPIX V5.1.1 CD 2007-01-04 EN to USB

So we have found out that the KNOPPIX 6.0.1 release is a BETA release, and hence does not have some features we want - specifically, it's not set up for persistence; there seems to be no way to get it to save the state and the user directories to persistent storage.

Furthermore, we have decided to install the older, released version, KNOPPIX v5.1.1, and have downloaded the KNOPPIX v5.1.1 ISO to the 2nd partition of the 4G USB stick which we installed v6.0.1.

Since the KNOPPIX v6.0.1 was missing some critical tools - telnet, K3B, etc - we have rebooted the HP machine called 'box' under Damn Small Linux (DSL) to perform this procedure.

The procedure is:

  1. mount USB pendrive partition 1 (the VFAT partition with the CD ISO image for v6.0.1) into the DSL file system.
  2. mount USB pendrive partition 2 (the ext3 partition with the copy of KNOPPIX_V5.1.1CD-2007-01-04-EN.iso) into the host (DSL) file system
  3. copy the KNOPPIX v5.1.1 ISO file system from USB pendrive partition 2 to USB pendrive partition 1
  4. perform the install tweaks given in USB KNOPPIX 5.1.1 persistent install from Linux | USB Pen Drive Linux on USB pendrive partition 1.

This should make the pen drive boot KNOPPIX 5.1.1 with persistence.

Note that both partitions on the existing USB pen drive are formatted as described in the installation document referenced above. That is, partition 1 is a 750M FAT16 partition for the CD image, and partition 2 is the remainder of the pen drive space (~3G in ths case) dedicated as an ext3 (Linux) file system.

Once the pen drive is bootable and persistent with KNOPPIX 5.1.1, it will be desirable to make partition 2 on the USB pen drive auto mount as the /home directory tree of the new system.