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]

Re: A FAQ regarding defrag and permissions of nonadmin files?


Brian Dessent wrote:
> Gmane User wrote:
>
>> Let's make sure we're comparing the same situation.  I've used bash to
>> explicitly change permissions to go-rwx for most of my files.  This is
>
> To be pedantic, you used chmod (or some other utility); bash is just a
> shell, it does not set permissions.
>
>> on a nonadmin account.  This is what chokes the defragger.  Do you
>> have the same circumstance?
>
> Yes, I just ran the series of commands in the previous mail as a
> non-administrator user, creating a file in 2 fragments.  I then switched
> to a user in the administrators group and ran O&O defrag (though the
> user that launches the job shouldn't matter as O&O runs decoupled as a
> service anyway) and the file was defragmented.

I didn't see the line where you switched users.

> Note that Win32 has a backup API which allows any user with the 'backup'
> privilege in their token to open any file, regardless of its ACL.
> Cygwin uses this to simulate the unix semantics of "root" (i.e. total
> access to anything regardless of permissions) and so for example the
> file I created with mode 600 as a regular user was completely readable
> from Cygwin when logged in as a user in the administrators group, even
> though the permissions/ACL deny it.  I suspect that O&O and most other
> defrag programs use this same technique.

I haven't run across a description of the backup privilege, but then
again, I only dug into NTFS permisssions with any seriousness today.
If Ultra Defragmenter does the job, I'll save the deeper digging for
another day.

Here are my observations on the leadup to Ultra Defragmenter.

JkDefrag's boot-time defrag is merely a scheduled task.  It must be
scheduled outside of safe mode, else the task scheduling service isn't
running and it isn't scheduled properly.  It doesn't run at all.  Even
after booting up outside of safe mode, the tasks exists, but doesn't
launch upon booting.  So it must be deleted after a normal boot, then
scheduled again.

JkDefrag's boot-time defrag didn't work as I expected.  It doesn't
arrest the boot process while it runs the defrag.  So the boot process
proceeds as normal, with the exception of being very slow because of
the defrag process that was launched during boot-up.  This means that
Symantec AV is running during the defrag, as are the full suite of
tools that are launched during a normal boot ie. many more than in
safe mode.  I don't want to fool around with the AV because it is set
the way it is according to the policy of the place where I work.  So I
tried again to boot in safe mode to see if the now-properly-scheduled
defrag will run.  It didn't.

I then installed Ultra Defragmenter.

Good news is that it seems to stop the boot process while it does its
thing.  There are no progress indicators that change during this
period.  After 20 minutes, the boot process continues.  I logged in
and tried to find the report that is supposedly generated.  It was
nowhere to be found, even though the report settings have reports
enabled (from the GUI).  Since the report settings specify HTML
output, I searched the hard disk for an HTML file dated within the
last day, but found nothing.  A google and usenet search does not turn
up mention (or even a question) of the path for the html report.  The
"Fragmented" button doesn't do anything, either.

Would you know if the boot-time defrag occurs before Symantec AV
launches?  (Note that the AV doesn't show up as a process in
safe-mode).

Where would the report be located?

Thanks!


-- 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]