“Operation Not Permitted” and the FAT-32 System

chown“, “chgrp“, “ln“, and “chmod“, behave oddly on fat-32, vfat, and ntfs file systems.  The “Operation not permitted” message may mean “This type of filesystem does not support that operation”.

Here’s the example:  I want to create a file and own the file.  I can’t seem to do it.

Step 1:  Confusion!  I don’t own the files I create!

chasm@chasm-blue-laptop:/big$ whoami
chasm
chasm@chasm-blue-laptop:/big$ date > today
chasm@chasm-blue-laptop:/big$ ls -la today
-rwxrwx— 1 root plugdev 29 2009-12-22 15:15 today

The created file, /big/today, is owned by user root, and group plugdev.  I can create, modify, and delete the file but I can’t seem to own it.  I had not heard of the plugdev group and Google is not helpful.   The plugdev group manages which users are allowed to use hot pluggable media and FAT-32 media.  Use ‘grep plugdev /etc/group’  to see who is in the plugdev group.

Step 2:  Failures and Bad Error Messages.

Even as root, I cannot change the owner, root, or permissions.

chasm@chasm-blue-laptop:/big$ ls -la today
-rwxrwx— 1 root plugdev 29 2009-12-22 15:27 today
chasm@chasm-blue-laptop:/big$ sudo chown chasm today
chown: changing ownership of `today’: Operation not permitted
chasm@chasm-blue-laptop:/big$ sudo chgrp chasm today
chgrp: changing group of `today’: Operation not permitted
chasm@chasm-blue-laptop:/big$ sudo chmod -x today
chasm@chasm-blue-laptop:/big$ ls -la today
-rwxrwx— 1 root plugdev 29 2009-12-22 15:27 today
chasm@chasm-blue-laptop:/big$ sudo ln -s today anotherday
ln: creating symbolic link `anotherday’: Operation not permitted

Note the problems with error messages:   “Operation not permitted” is not about user privileges, and chmod fails silently.  In this case, “Operation not permitted” means “The vffat filesystem does not support that operation”.

Step 3:  Enlightenment

The problem is that FAT-32 file systems do not have permissions, owners, and groups per se.   The entire file system is given one set of permissions at mount time, specified in the file /etc/fstab.  Let’s change it.

chasm@chasm-blue-laptop:/big$ grep “/big” /etc/fstab
# /big was on /dev/sda6 during installation
UUID=C14C-CE25  /big            vfat    utf8,umask=007,gid=46 0       1
chasm@chasm-blue-laptop:/big$ sudo vi -u NONE /etc/fstab
chasm@chasm-blue-laptop:/big$ grep “/big” /etc/fstab
# /big was on /dev/sda6 during installation
UUID=C14C-CE25  /big            vfat    utf8,umask=007,uid=1000,gid=1000 0       1

I made this change using vi -u NONE to preserve tabs.  Before the change all files in the /big file system were owned by the uid of 0 (root) in the gid of 46 (plugdev).  After the change, all files will now belong to uid and gid.  Here’s the quick test of remounting the filesystem with the new permissions.

chasm@chasm-blue-laptop:/big$ cd ..
chasm@chasm-blue-laptop:/$ sudo umount /big
chasm@chasm-blue-laptop:/$ sudo mount /big
chasm@chasm-blue-laptop:/$ ls -l /big/today
-rwxrwx— 1 chasm chasm 29 2009-12-22 15:27 /big/today

The only way to change a permission is to change permissions for the entire file system in /etc/fstab.  Also, the file system supports neither symbolic links nor hard links.

del.icio.us Reddit Slashdot Digg Facebook Technorati Google StumbleUpon Tailrank Yahoo Bloglines Newsvine Spurl Fark

Uncategorized

Comments (0)

Permalink

Open Letter on Autodriving Cars to Representative Honda

Junior autodriving car from 2007 Grand Challenge

Dear Honorable Representative Honda:

Silicon Valley needs an absolute immunity that limits damages for auto-driving cars to $10 million per death or injury.

Silicon Valley is looking for another trillion dollars worth of growth to fuel.  One great idea is limited by the absence of barely-controversial legal framework.   You could provide this framework, enable use to get back to work, make money, and make everyone happy.

Everyone includes the seed level start-ups based on Stanford’s historic win on the DARPA Grand Challenge auto-driving contest, the 40,000 Americans that die each year from accidents, and my six year old who is more danger from automobiles than any other source.   The primary hold-ups are legal, not technical.

Good legislation would specify maximum damages, perhaps indexed to COLA.  The maximum amount would need to include any payments for negligence, wrongful death, unsuitability, and fines among all possible parties from designers, software, manufacturers, and dealers.  Having some maximum liability amount, any amount, means that companies can go build in liability and proceed.  If the legislation only covered cars manufactured until 2030, that would be plenty.

One licensed driver in 5,000 currently dies from car accidents every year.   If an American company reduces that number to one in 50,000, it should not be destroyed by the variability of the court system.

Please sponsor such a bill, which would likely be debated in your Appropriations/Commerce subcommittee.

Charles Merriam

del.icio.us Reddit Slashdot Digg Facebook Technorati Google StumbleUpon Tailrank Yahoo Bloglines Newsvine Spurl Fark

Politics

Comments (3)

Permalink

7 minute talk follow-up

Some follow-ups, corrections, and expansions.  Being correct takes effort.

First, someone very knowledgeable on the internals noted that I was sloppy with the terms ‘datastore‘, ‘GBase‘, ‘GoogleBase‘, ‘GQL‘, and ‘BigTable‘.  Mea culpa.  Datastore is the most generic term and the specific one for Google App Engine is referred to as the “App Engine datastore“.  The App Engine datastore is accessed through GQL, a language reminiscent of SQL.  The App Engine datastore is built on BigTable and exposes some of BigTable’s capabilities (see Wikipedia, a formal paper,  or video documentation).    GoogleBase is an independent Google product that is also built on BigTable.  GBase is a guitar search engine and the naturally elided form of “GoogleBase” after saying it a hundred times.   Whew!  Terms.

Speaking of terms, the contract term dealing with indemnification in the Terms of Service:

13.1. You agree to hold harmless and indemnify Google, and its subsidiaries, affiliates, officers, agents, employees, advertisers, licensors, suppliers or partners, (collectively “Google and Partners”) from and against any third party claim arising from or in any way related to (a) your breach of the Terms, (b) your use of the Service, (c) your violation of applicable laws, rules or regulations in connection with the Service, or (d) your Content or your Application, including any liability or expense arising from all claims, losses, damages (actual and consequential), suits, judgments, litigation costs and attorneys’ fees, of every kind and nature. In such a case, Google will provide you with written notice of such claim, suit or action.

The annoying clause is “(b) your use of the Service”.   Given how claims are written in patents, it is entirely likely that use of the API would be an actionable breach if the Google App Engine violated patents.  Google could require indemnification by users of the API.  For most people and smaller companies, the reputation of Google and pledges to “not be evil” should be sufficient.

Speaking of evil (note the clever transistion), the lazy index evaluation that makes the database look like “read committed” is discussed here.

Finally, high availability is hard, and “9’s” go faster than you remember.

90% (1-nine) is a downtime of 36.5 days per year.
99% (2-nines) is a downtime of 3.65 days per year.
99.9% (3-nines) is a downtime of 8.65 hours per year.
99.99% (4 nines) is a downtime of 52 minutes per year.
99.999% (5 nines) is a downtime of 5.2 minutes per year, or six seconds per week.

A claim of about 2-nines reliability is reasonable.  Google App Engine was launched around four months ago in mid-April, so about a day of downtime is 2-nines.  It was down on June 17 for some unreported number of hours, and was down again on June 19 and June 25.  Add in little outages where various features broke, blocking PayPal, and other nits.  There is a list that occasionally reports downtime, but no exact statistics are available.  If there were no future outages, and you wanted to demonstrate four nines reliability, it would need to take years to overcome the existing outages.

Keep on working on it.  I hope that Google App Engine will be more fun in the future.

del.icio.us Reddit Slashdot Digg Facebook Technorati Google StumbleUpon Tailrank Yahoo Bloglines Newsvine Spurl Fark

Coding
Reviews
Web
Write-up

Comments (1)

Permalink

Google App Engine – 7 minute talk

[I gave this talk at the BayPiggies Meeting on August 14, 2008.  The 'Newbie Nugget' talk ran about seven minutes and used only spoken words.  This is my recollection of what I said.]

I drove here today.  I got in my car, used the six speed manual transmission, steering wheel, and pedals.  I had to know how to change lanes and the rules of the road.  I needed to know traffic patterns, and directions from my house to Google.  I got here.

It was the most dangerous thing I did today.  Traffic accidents kill about 40,000 people a year in the U.S. alone.   It’s the number one cause of death for everyone from age five to about my age where heart disease and cancer start catching up.  We just take it for granted.   That’s not the car I want.

I Want My Autodriving Car!  I want to push a button on my cell phone, walk out the door a minute later, and hop into the open door of a car.  It would take me where I want to go, take the best route given current traffic, and drop me in front of the door.   It would never crash.  It would just work.  That’s what I want in a car.

Here’s what I want in an application engine.   I want to write in one language.  I want one set of tools.  One naming convention.  I want to be able to translate my thoughts into code cleanly.  I want the application to be on the Internet and scale and to share that application with everyone through a url or something like the IPhone App Store.   That’s what I want in an application server.

Google App Engine is not there yet.   Google App Engine is a step along that path, and lets you see where application engines are headed.  For the first time, you can see that installing and configuring MySQL on a server and then renting space in a rack for the server will someday sound the same as someone talking about pulling the engine in his car and changing out the rings in the driveway.  I guess you could do that yourself, but why?  You still need to work in the soup of languages:  HTML, CSS, JavaScript, HTTP headers, Flash, Python, and more.   You still need to coordinate your tools for each language:  editor coloring, debugger, make system, test harness, code coverage, and documentation.  It does us good to keep our eyes on the App Engine we want.

So, let’s talk about Google App Engine:  what is does, how to write for it, where you would use it and not.

Google App Engine is fundamentally a deployment engine.  After you write your application, it provides that application out on the Internet.  It’s also very early technology.  It sort of supports Django (’jango’ for those who talk; ‘d-jango’ for those who read), but using the latest version runs up against its thousand file limit.  Fully half of the seventy posts a day on the mailing list are about deployment quotas or looking for workarounds to deployment limits.  You cannot run any long job that takes more than a few seconds.  Still, it’s free.

Writing for Google App Engine is much like writing for any other application engine.  You use the WSGI interface, which someone taught me is pronounced ‘whiskey’, that provides a mapping between the requested URLs and the classes to serve them.  You write a class that has methods to respond to HTTP messages like get and put.  Your codes spits out the HTML and whatever to respond.  Sometimes you trigger urlfetch, from urllib, of your own application like remote procedure calls to avoid hitting computation time request limits.  You store your data in the Google Base data store.

Google Base can be a problem.  The Google Base datastore is not a relational database.  It’s a great database for working data you collect from all over the web, like web pages or screen scraping, where you are working with massive amounts of data and some of it is always aging out.  It should never be used for accounting.  For example, you can’t just run a GBase query to update the total invoices for a month.  You need to walk through all the records.  If you update the date on an invoice and then retotal the invoices, you might get the wrong answer.  GBase doesn’t guarantee the invoices index is immediately updated.  It would probably work, but if you were to try running tests to see how often it fails you’d use up your quota and be locked out for a few days.

So where is Google App Engine the right choice?  First, it’s free.   It’s a good way of learning how to write for application servers.  There are some good tutorials and videos and off you go.  If your application needs a lot of bandwidth downloading from elsewhere on the internet, it’s probably a good choice.  So if you want to try out an idea that’s not for making money, go for it.

Where is Google App Engine the wrong choice?  If you are trying to make money, it’s right out.   First, the license includes clauses that require you to indemnify Google if the API infringes patents.  A Fortune 500 company won’t let you agree to that.  Second, its reliability wants to get up to five nine’s (.99999) but is hovering between one and two nines.  Third, it’s really early tech.  You can watch lots of  bugs get filed and occasionally fixed, but they are in the stage of getting it feature complete first.

In conclusion,  I want an auto-driving car and I want my great application engine.  Google App Engine is like getting a taxi.   A taxi does the driving, but I still need to know directions and road conditions, and I still get into car accidents.   With Google App Engine, I still need to know the whole stack of languages, my site still gets hacked, and it still goes down a lot.  But you can see the future in Google App Engine, and it may turn into something great.

[Clarifications and follow-ups for this article got a bit long.  I added some expansions on this blog post.]

del.icio.us Reddit Slashdot Digg Facebook Technorati Google StumbleUpon Tailrank Yahoo Bloglines Newsvine Spurl Fark

Coding
Reviews
Write-up

Comments (1)

Permalink

KDE bug list…

For those few brave souls working on KDE 4, this is my list of bugs I noticed in the first couple hours.  Some may be viewed as belonging to other subsystems.  This is installing KDE 4.1, 32 bit, on a new T-6836 laptop.

  • On live CD, font on “read me” came up as unreadable and clipped.
  • The whole “add widgets” system is difficult; I keep wanting to add widgets to my task bar.
  • Double clicking on a downloaded debian package brings up Ark but without the package loaded. Ark doesn’t appear to handle this file type.
  • Hey! Where’s my alt-space quick launch (Katapult) or a replacement.
  • Where’s my easy “look for more widgets to install” thingee?
  • During install on partitioning disks, the progress bar hangs at 0% for about five or ten minutes.
  • My traditional bar across the bottom disappeared and I don’t know where it went. Sometimes KDE seems to fail to bring up any interprocess communication.
  • Once I moved the app launcher to the right hand, it made my menus funky, and I don’t know how to make it go back. I eventually blew away my .kde* directories
  • Why do I have a .kde3 directory when running kde4?
  • Tons and tons of warnings and errors in the dbus backtrack.
  • Crashing Konquerer on GMail. Why KDE has its own browser is beyond my keen.
  • Grub should initialize with better names. Not just “Generic Linux…” and “Windows Longhorn…”. Also, there are two Windows entries, one of which should be labelled recovery.
  • Default width on “Add Widgets” box is way too narrow.
  • In “Add Widgets”, “Pager”, “System Tray” and “Task Manager” have too generic icons.
  • Can’t be sure or prove it, but “All Widgets” seems to not have all widgets the first time.
  • Power management, by default, ran until out of battery and turned off.
  • Appears not to save settings until successful shutdown of window manager.
  • When I click on the “Leave” icon, choose restart, I get another level of menus to try to restart again.
  • Network manager crashed at least once or twice. No clear way to make it start again.
  • No ’small icons’ for a quick launch bar.

After a certain level of  bugginess, it makes no sense to report bugs unless one is also submitting patches.

del.icio.us Reddit Slashdot Digg Facebook Technorati Google StumbleUpon Tailrank Yahoo Bloglines Newsvine Spurl Fark

Uncategorized

Comments (0)

Permalink

KDE 4: Crud and the Quest for “The One Last and True Windowing System”

80% of effects come from 20% of causes
— Pareto Principle by Vilfredo Frederico Damaso Pareto, 1906

90% of Everything is Crud
Sturgeon’s Law by Theodore Sturgeon, 1956

100% of Everything is Crud
– Linear extrapolation of above, 2006.

There seems to have been a natural tendency for us to look at past as some magical time when quality mattered. Really, only the pure quality of finished work survived. We forget the uncountable steps towards quality.

In the world of desktop environments, the journey towards quality continues. KDE 4.1 makes a step, following trends, and aiming to be The One Last and True Windowing System.

Quality Steps and Missteps

I installed Kubuntu with KDE 4 on my laptop, and am using it to write this post. That it is written at all shows a minunum level of quality. That the post starts with these quotes shows a maximum level.

I find immediate problems when installing. The very first action, the “Read Me” during the LiveCD boot, comes up in a clipped and illegible font. During partitioning the disks, the progress bar hangs at 0% for ten minutes. The task bar lacks resizing and basic functionality. The quick launcher, Katapult, disappeared. A new program launcher experiment falls flat with some buttons activating by click and other by hovering the mouse.  Konquer still crashes.   I discover new bugs a few times per hour.  These are the the nits and bugs of a new system.

The subtle problems are the problems repeated from previous years: the LILO boot system that unhelpfully refers to Vista as “longhorn” and Kubuntu as “generic Ubuntu core”; the cobbleware of screen layout that has fonts too big for buttons, text too wide for dialogs, and odd alignments; the usual flakiness with power and wireless management. These problems persist for ages from expectation, difficulty, or blindness.

So quality is a step downward while the easy bugs are fixed. Some nice features, like FileLight are a definite step up that I expect every other distribution to copy soon. KDE did buck the trend in releasing a quality downgrade.

Trends in Window Managers

KDE 4 follows the collective wisdom of other software competitors including GNOME, Sugar, Microsoft’s Windows line, and Apple’s OS X line. It tries to be different just like everyone else.  It adds new functionality in pieces and parts.  The hodgepodge of bundling, or smush, that make up windowing systems includes GUI and interface candy, applications, and APIs.

Smush is not pejorative. Open source swaps in and out competing components and the windowing system selects components under its seal of approval and delinates APIs outside its control. Quality for each component is involved at several layers. When the power management on my laptop fails to hibernate before powering off, I could file a bug with KDE, Ubuntu (link to shuttleworth), Debian, the Linux ACPI mailing list, hardware discovery, or just fix it myself. When searching for a workaround, it could exist anywhere.

KDE is following the trend towards aggressively  cross platform deployment. By using Qt 4 as it’s underlying graphics engine, KDE hopes to deploy on desktops (Linux, MS Windows, and OS/X), cellular phones, and some embedded devices. It is currently hampered by Qt 4 having no LGPL or BSD license, requiring a special licensing cycle to deploy any commercial application. The previous Qt 4 copyright holder, TrollTech needed this revenue to continue operations. The new holder, Nokia, may free the code in order to encourage wider adoption and easier developer migration to its cellular phones.

KDE also follows the practice of wrapping more and more functionality into API layer plug-ins. Rather than commit to a scripting language, Kross wraps or interfaces to Python, Ruby and JavaScript. Rather than commit to a multimedia engine, Phonon creates one more layer of indirection for a common interface to GStreamer, QuickTime, DirectShow, and others. The new release switches many of the wrappers so now it is Phonon (multimedia), Solid (device integration), Plasma (a new desktop), Kross (scripting), DXS (application data updates), Decibel (human communications), and D-BUS replacing DCOP (application messaging). It is unclear if “one more layer of indirection” will be the correct solution in the long run.

In the long run, of course, KDE hopes to birth “The One Last and True Windowing System.”

The One Last and True Windowing System

Results 1 – 10 of about 1,040
Google search for “One API to Rule Them All”

Windowing systems race towards the goals of full functionality, sweet abstractions, and wide deployment with the winner creating a work that will last decades. Each release brings new experiments and implements growing standards. Implementations trump ideas. Differing implementations get abstracted and merged. Engineers have always raced towards sweet solutions.

Software does get finished. We still use the C programming language after more than a third of a century. The syntax, style, and assumptions are passed to new languages such as C++, Python and Ruby. Other contenders failed. Hardware architectures now handle pointer indirections, sequential arrays, and null terminated strings. C goes through occasional updates and forks, but it endures. Also enduring are the most of the Internet stack including TCP/IP, DNS/Bind, and packet switching; HTTP protocols, SQL, and many more. These become the common parts upon which we solve new problems. Many hope to finish writing the desktop software.

FreeDesktop.org gently pushes towards standardization by facilitating discussion. It speeds the process of making compatible, then integrating, then merging competitng development that has become similar. It’s influence on KDE is unmistakable.

So, will KDE give birth to the “One Last and True Windowing System” that lasts for decades?

Conclusions

KDE took a significant risk. It’s adoption of Qt 4, dropping of DCOP, and making so many changes significantly hurt its quality. On the other hand, it might provide a new level of functionality to catapult into the top three windowing systems. Time will tell. For people just wanting a desktop to work, stay away for six months. Continue Reading »

del.icio.us Reddit Slashdot Digg Facebook Technorati Google StumbleUpon Tailrank Yahoo Bloglines Newsvine Spurl Fark

Coding
Reviews
Web
Write-up

Comments (0)

Permalink

Buying a new laptop

I went out and bought a new laptop, having succesfully proven that driving over a laptop is not a good idea.

First, I watched SlickDeals for a reasonable, cheap system.  I’ve found that laptops have a short obsolescence period, and buying near the bottom end is best.  Second, I went to Best Buy and picked it up.  Best Buy has a less than stellar reputation, so I double-checked the factory seals.

And the system had a bad wireless.  DOA.   Some hours on Gateway’s chat trying to install drivers for a broken subsystem.   They gave me an RMA number; Best Buy has a less than stellar reputation.

The next morning, I went back to Best Buy.  Ten minutes for them to poke and prod and I had a new system on the way out.   Sometimes the reputation is undeserved.

Boot up Windows; download Firefox; download Kubuntu; burn CD;  install and go.

Life is better again.

del.icio.us Reddit Slashdot Digg Facebook Technorati Google StumbleUpon Tailrank Yahoo Bloglines Newsvine Spurl Fark

Uncategorized

Comments (0)

Permalink

Today’s Productivity Tip!

In hopes of making a more productive utopia, I share this tip:

DO NOT RUN OVER YOUR LAPTOP WITH A MOTOR VEHICLE.

This has caused a noted decrease in my productivity.   A corollary for advanced production specialists follows:

DO NOT RUN OVER LAPTOP IN THE  MORNING WHEN THE BACK-UP DRIVE WILL BE DELIVERED THAT AFTERNOON.

I hope this bulletin prevents the same mistakes that I’ve been having this week.

del.icio.us Reddit Slashdot Digg Facebook Technorati Google StumbleUpon Tailrank Yahoo Bloglines Newsvine Spurl Fark

Uncategorized

Comments (0)

Permalink

Freeze Test Ice Cubes

Problem: Sometimes frozen food melts and refreezes.

Refrigerated trucks don’t.  Freezer doors stay open.  The freezer case goes out.  Groceries get left in the car for a long trip.  The power company decides to play power line roulette.  Later, the problem is fixed, and the food freezes again.  It’s hard to know if food thawed out and was then refrozen.  For some foods, this can be dangerous.

Solution: Fancy Ice Cubes.

Put a small “safe to eat” ice solid inside each back of frozen vegetables.  If it’s missing or unreadable, the vegetables have been thawed and refrozen.  The ice solid is made from water with two or more food colorings, so pick colors like the food.

When ice melts, the liquid will mix.  If you make ice cubes out of two or more colored waters, the two colors will mix.   For the simplest example:

  1. Fill an ice cube tray so that each hole is half full.
  2. Put in one drop of yellow food coloring into each hole.
  3. Freeze.  You now have half height yellow ice cubes.
  4. Fill the rest of each hole of the ice cube tray with plain water.
  5. Put in one drop of blue food coloring into each hole.
  6. Freeze.  You now have ice cubes that are yellow on the bottom and blue on top.
  7. Leave the ice cubes in the freezer.  Have a three day power outage and then restore power for a day.
  8. You now have green ice cubes.

That’s the core idea.  You have a way to tell if the item was refrozen.  From here, you can get fancy.

  • Adjust the surface area ratio to signify how much thawing is acceptable.  Use thin slices when less thawing is allowed.
  • “Print” tamper proof cubes in multiple colors.   You might ship cases of vegetables with a thin slice with the date and company logo in different colors.  If it the slice arrives a melted mess, don’t accept it from the trucker.
  • Use multiple fluids or widths to make a ‘gauge’ to show exactly how melted the shipment got.

This could easily commercialize as a money saver by identifying truckers making expensive mistakes or as a premium brand spiff by making the ’safety tag’ inside each bag.
Shoo, go make money.

del.icio.us Reddit Slashdot Digg Facebook Technorati Google StumbleUpon Tailrank Yahoo Bloglines Newsvine Spurl Fark

Idea
Ideas
Invention
Products

Comments (0)

Permalink

T Shirt For Rights

Problem: People Fail To Understand the Whole “Gays Can Marry” Thing

Solution: A T-Shirt!  It’s Always The Solution

FIRST THE COLOREDS…

THEN THE WOMEN…

NOW THE GAYS?

LIBERALS AND THEIR “RIGHTS”

del.icio.us Reddit Slashdot Digg Facebook Technorati Google StumbleUpon Tailrank Yahoo Bloglines Newsvine Spurl Fark

Idea
Ideas
Politics
Products

Comments (0)

Permalink