X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Gmane User Subject: Re: A FAQ regarding defrag and permissions of nonadmin files? Date: Tue, 08 Apr 2008 03:02:58 -0400 Lines: 74 Message-ID: References: <47FADE53 DOT 1DFBEE53 AT dessent DOT net> <47FAEF8D DOT 24725E79 AT dessent DOT net> <47FAFB2C DOT F289B878 AT dessent DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) In-Reply-To: <47FAFB2C.F289B878@dessent.net> X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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/