This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

A FAQ regarding defrag and permissions of nonadmin files?


Today was a revolutionary day.  Ever since I started using cygwin years ago, I
just assumed that defrag was doing whatever it does best, and that it was normal
to have a whole whack of user application files un-defragged.  This list of
"fragged" files got enormous over the years, and almost all the files were
related in some way to cygwin, either in the c:/cygwin tree or had been
manipulated from bash.  Having to replace the drive with 4200 RPM didn't help,
and all the googling and usenetting in the world didn't reveal the cause for
those stubborn files.  I could feel the lifetime draining out of the overworked
hard drive.  My life force was draining along with it, as I sat catatonically
watching the LED blink and listening to the disk chatter.  Occasionally, I'd
wake up with a start, only to find that I had done so prematurely, as more
waiting was in order.

I was all set to do something drastic, like buy commercial defraggers, or
purchase Ghost and a new hard disk so as to clone the current hard disk into a
defragged incarnation.  All this for a slow 30GB drive on a laptop that's a
better part of 10 years old, whose housing and processor fans were probably near
death (probably because of dust buildup, causing them to kick in even when XWin
took up a few percent of CPU to blink gvim's cursor).  Since the venerable
laptop only had USB1, the bandwidth requirements of the cloning solution would
also require purchase of some kind of card bus adapter.  (Unless the drive could
fit into the bay currently occupied by the CD burner)

Well.

Before launching into something so foolish, I was going to try a free defragger.
 If the system got toasted, that would be the guy upstairs signalling that it
was time for a new laptop -- preferrable to spending some unknown number of days
with a new drive, reinstalling Windows 2000 and recustomizing the environment to
the way it was before.  So much the truer if it was the disk controller that went.

The defragger I used was JkDefrag.  And there was the explanation, right in the
online documentation.  The files to be defragged need to be accessible by admin.
 I never suspected that something as system-wide as defragging would be
dependent on a specific account.  Setting all files to go+rwx allows all the
files to defrag.

This arrangement clashes directly with the unix practice of having all nonadmin
user file permissions default to u+rw,go-rwx.  A unix user (not necessarily an
admin, as I've never been) who wanders into the weird and wonderful world of
Windows would think he/she found salvation in cygwin (and would mostly be
right).  He/she (let's just say "It") would innocently and obliviously bring its
Unix ways with it, and never be able to defrag.  I am baffled by why this caveat
isn't documented in any defrag or cygwin posting/page that I've come across.

In any case, I'm quickly ramping up on the weird, wondrous world of NTFS
permissions to allow admin access to my files without granting it to group and
others.  Currently doing it through the the Windows GUI, as the Cygwin
documentation gets quite deep.  I suspect, however, that it might be necessary
to go the way of cygwin to hierarchically set things as required, though that
will reveal itself soon enough.

In any case, considering the aforementioned default ways of unix users, and the
absence of documentation of caveats for defragging...perhaps this can be made a FAQ?


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]