Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 Message-ID: <4362F4EC.4D5EE03B@dessent.net> Date: Fri, 28 Oct 2005 21:05:00 -0700 From: Brian Dessent MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Files not accessible after reinstalling OS and cygwin References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com Deb* Mohanty wrote: > I had windows2k and cygwin installed on my machine, and I had marked > some files as read-only (using cygwin chmod). For some reasons, I had > to reinstall windows2k. I also reinstalled cygwin in the same location > as it was installed earlier. > > However the files which were marked read-only earlier are not > accessible now. They can't be deleted either. Those are huge files and > taking up the space. When you reinstall Windows your new user account has a new SID - or maybe it's not a new SID per se but there is some kind of GUID that uniquely identifies a certain user on a certain installation of windows. I'm not sure of the precise term for this. So when you reinstall Windows, you get a new GUID, which means that any ACLs that refer to the old user do not apply to any of the new users, even if the names are the same. In other words, a user named "brian" on the new installation is not the same as user named "brian" on the old one, even if they both have the same UID. This is just a long winded way of saying that the ACLs you created on the old install are doing precisely what you told them to do, preventing write access to anyone but the owner. And technically your new user account is not the owner because it's not the same account. So just take ownership of the files. You can do this recursively for an entire directory tree in a single operation using Explorer. Properties -> Security -> Advanced -> Owner. The Cygwin equivalent would be "chown -R user /path" Brian -- 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/