SwirlyMMS picture import fix

SwirlyMMS 1.1.1 is a great piece of work but if you save pictures to the camera roll with it, or indeed any of the 1.0 releases, you’ll find that you cannot import your pictures on your PC.

The problem is that SwirlyMMS is saving the pictures with the owner root instead of mobile. I’ve come up with a couple of solutions for this:

  • Change to the camera roll picture directory in putty or Mobile Terminal and type  chown mobile IMG_0036.JPG replacing IMG_0036.JPG with the name of the picture
  • Browse to the camera roll directory in WinSCP and use the custom command chown mobile ! on the affected picture
  • Use my bash script from within Mobile Terminal (I have it saved as fixswirly.sh in /private/var/mobile as this is where my Mobile Terminal starts up):
#!/bin/bash
PhotoDirectory="/private/var/mobile/Media/DCIM/100APPLE"
 
# Setup find correctly.
export IFS=$'\n'
 
# Loop through the photo directory.
for x in ${PhotoDirectory}
   do
      # Find all Files
      for i in $(find $x -type f)
         do
            # Fix Permissions
            chown mobile $i
         done
   done

It has to be run as root and if you run it from a location that is not on your PATH you will need to run it as such: ./fixswirly.sh or sh fixswirly.sh

Based on an example Bash script by linickx.com

This entry was posted on Wednesday, July 23rd, 2008 at 9:12 pm and is filed under Programming. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

You must be logged in to post a comment.