Fog Creek Software
Discussion Board




More Win XP Pro Blues

Before was the file that refused to be deleted.

Now I have a lot of shortcut files inside a folder that refuse to have the read-only flag removed.

I am the Admin of this machine. I installed the application (cygwin) that created those shortcuts. But for the life of me, I can't delete them or remove the read-only flag.

More ideas anyone? And by the way, who the hell has more privileges than an Admin on a Windows machine? Am I not suppose to be God here? r00t? How can this happen?!?
I mean, if we were talking about some super 1337 app developed by the Cult of the Dead Cow, I could accept it.

But a miserable SHORTCUT?!?!?

RP
Thursday, May 13, 2004

Are you running as an administrator, or *the* Administrator?  I know with Windows SFU 3.5, you have to be running as *the* Administrator to properly uninstall it - being part of the Admins group doesn't work.  It may be the same with Cygwin.

Check the permissions & ownership - all may not be as it seems.  If the permissions seem ok, turn on auditing for the directory/ies that contain the files/shortcuts.  For some reason, the setting of the audit bit corrects any ACL corruption there may be - or at least brings it to light in the GUI... at least that's what my old PSS tech lead used to tell me.

Greg Hurlman
Thursday, May 13, 2004

I had the same problem, and I managed to get around it somehow.. Reassigning permissions or something like that. I can't for the life of me remember how. Make sure you keep us posted if you figure it out, because this was a pain to figure out.

sid6581
Thursday, May 13, 2004

An administrator is only God if he wants to be.

In Win 2K and XP you take permissions, not grant them. So it is possible that you do not have ownership of the files. As has been said, take ownership of the folder, and then you should be able to change the properties.

Incidentally Adminstrators on W2k and XP machines can also exile themself from their kingdom, by taking away their own and system permissions on files so that nobody has the right to access the disk, and it can't boot at all.

Perhaps it would be fairer to say that an Administrator is an improved Mach II version of God on his machine.

Stephen Jones
Thursday, May 13, 2004

Try to remove the readonly flag with cygwin:

chmod +r filename

I had a similar experience: go in cygwin, do chmod -x on an executable, then drop in a cmd shell, and try to execute that exe - result is access denied.

cygwin fsck's with the NT special permissions in order to emulate the unix rwx triplet

Mark

Mark Tetrode
Friday, May 14, 2004

Could be that cygwin has set the unix uchg flag, (however Windows implements that as ACLs)

you might try
chflags nochg filename

A.T.
Friday, May 14, 2004

d'oh
chflags nouchg filename

A.T.
Friday, May 14, 2004

The owner of the file is god, not the admin. The admin is an indirect and more powerfull god in the sense that he can take ownership of anything. You are probably not the owner of these files. You can take ownership through rightclick->options->security->advanced->owner.

If your XP workstation is standalone or part of a workgroup, the security tab will be hidden. To have it show,
Open Windows Explorer
Choose Folder Options from the Tools menu
On the View tab, scroll to the bottom of the Advanced Settings
Clear the check box next to "Use Simple File Sharing."
Click OK to apply the change

Just me (Sir to you)
Friday, May 14, 2004

"I know with Windows SFU 3.5, you have to be running as *the* Administrator to properly uninstall it - being part of the Admins group doesn't work."

What do you mean by "properly uninstall"?

I run Win2K Pro as an admin, not *the* admin, and I uninstalled it - I got no warning during uninstall, it doesn't show on Remove Progs, there's no process in Task Manager, and there's no trace of it on the HD.

AM I ovelooking something?

Paulo Caetano
Friday, May 14, 2004

I think the guy has made a mistiale. There is no such thing as "The Admin". As Justme and I have pointed out, the probalble reason is that he needs to take ownership of the file.

If special file permissions aren't set, then any member of the administrators group has the right to install and uninstall.

Stephen Jones
Friday, May 14, 2004

Paulo-

Either you got lucky, or I got unlucky - I had several errors during my first attempt at uninstall, and found a KB article that recommended logging in as "Administrator" to uninstall it - that worked.

In my case, it seemed that the Administrator had been given rights, not the Administrators group.

Greg Hurlman
Friday, May 14, 2004

I had this problem with Cygwin after I re-installed XP.  I got so frustrated I formatted the drive.  That fixed the little s.o.b....

Bill Rushmore
Friday, May 14, 2004

"Either you got lucky, or I got unlucky "

Could also be because of the install options. I installed the bare minimum. I was only looking for a good shell replacement, and SFU seemed overkill.

Haven't tried Cygwin yet.

Paulo Caetano
Friday, May 14, 2004

It is known for software installed as Administrator only to work for the Administrator account that installed it.

It is badly written software.

What it does is set itself up in directories, or write to the registry, and give permissions only to the individual account, and not for the whole group.

If you delete the account that installed it it becomes a real mess. What you have to do is make yourself the owner, presumably of the files and also the registry keys.

Stephen Jones
Friday, May 14, 2004

I had this problem a couple of days ago.  It took some hours but I finally found something that worked.  I essentially did a chown to another user and then chown it back using cygwin.  I believe the commands I used were this:

find . | xargs chown root
find . | xargs chown user (or whatever your user is)

After I did this I was finally able to delete the files.

Oren Miller
Friday, May 14, 2004

*  Recent Topics

*  Fog Creek Home