Windows 7 - file modes give me NO access

ScottRNelson

Mr. Dual Sport Rider
I have a Windows 7 machine and do a lot of stuff with Cygwin. I had a folder containing music that wouldn't let me update a file, so I tried to fix the read only file protection that was showing and managed to do "chmod -r" (with some other stuff) which changed the files so that I can't read them.

In Cygwin "ls -l" shows the top folder with file protections: drws-ws--t+

What I want is drwxrwxrwx+

In any case I've tried fixing it in Windows and tried fixing it in Cygwin and all I get for any of them is "permission denied". In fact, if I try to show the folder properties in Windows then try changing anything, I get a pop up properties window that I can't even get rid of.

Any ideas how to delete this folder and everything in it?
 

rodr

Well-known member
Have you tried in cygwin from the folder's parent:

chmod -R a+rw foldername

?
 
Last edited:

ScottRNelson

Mr. Dual Sport Rider
Have you tried in cygwin from the folder's parent:

chmod -R a+rw foldername

?
Permission denied
Permission denied

One for the folder, one for trying to read what's in the folder.

Thanks for trying to help. I'm hoping somebody eventually has the right recipe for this.
 

rodr

Well-known member
The suggestion is you're not logged in with superuser permissions. If not that then we're reduced to guessing... maybe go into Windows Explorer and do View -> Hidden Items.
 

rodr

Well-known member
The other thing you might do is boot up a Linux rescue image from CD or USB, mount the Windows partition and then change the permissions or delete the folder.
 

ScottRNelson

Mr. Dual Sport Rider
I don't see any View -> Hidden Items option.

In Windows Explorer, when I show the properties of the top folder, it has the attribute "Read only" set. Clicking the button to turn it off then hitting Apply doesn't give an error message, but it also doesn't actually do anything. If you exit the Properties window and get a new one it still has the same read only setting.

If I go to the Security tab in the Properties window it has the following list:
NULL SID
CREATOR OWNER
Authenticated Users
SYSTEM
NelsonFamily (NELSONCOMPUTER/User)
None (NELSONCOMPUTER/None)
Administrators (NELSONCOMPUTER/Administrators)
Users (NELSONCOMPUTER/Users)​
There are no accounts on this machine - you don't log in or anything.

It has full "Allow" permissions for NULL SID and Authenticated Users. It has greyed "Allow" permissions for SYSTEM, NelsonFamily and Administrators. Nothing is checked for the others. I think the default is Users on this machine.

I can click on the Edit button and click Full Control on one of the ones with no check marks and it will show everything being checked, but when I click on Apply I get "Access is denied" and then it tells me to try to correct the issue without actually giving me any useful hint as to how to do that.

I don't see anything in the control panel that hints at being able to help fix this.

As for booting up Linux, I was hoping to not have to take such a drastic step as that. That would be non-trivial, unless I can find someone around here that I can take the drive to that can plug it into a Linux machine.
 

Tom G

"The Deer Hunter"
You can try to run the file system check. May not help, but won't hurt either. My understanding was you can't really boot into cygwin. It's like an executable under Windows. But it's been many years that I used it, so I may be wrong.
 

ScottRNelson

Mr. Dual Sport Rider
You can try to run the file system check. May not help, but won't hurt either. My understanding was you can't really boot into cygwin. It's like an executable under Windows. But it's been many years that I used it, so I may be wrong.
The suggestion was to boot into Linux, not Cygwin. Yes, Cygwin just gives you a unix-like interface and system calls under Windows. It's good for running old Unix programs.

Running Disk Cleanup right now, but not expecting it to do anything useful.
 

Sharxfan

Well-known member
Sometimes you can do things via the command prompt that are blocked in file explorer. Try opening the command prompt in administrator mode and changing the directory to the one you want. some commands are here with the switches.
https://www.virtualhelp.me/windows/691-change-access-permissions-in-command-prompt

if it was me I would make a new folder and test to make sure you have permissions to do what you want with a text file then using the command prompt you can move all of your files to the new folder and see if that resets the permissions.

Another thing to check is that you don't have the files open somewhere else or in some program that is running in the background and this is what is stopping you with that generic error.

If all else fails you can probably delete them through the command prompt if you get fed up enough.
 

ScottRNelson

Mr. Dual Sport Rider
Any chance your antivirus program has hijacked permissions?
I don't run an antivirus and I know that I did this to myself. I'm just annoyed that now I can't undo it. The main reason I'm pursuing it is for my own education now. Right now it's just a minor annoyance. After moving the files out of the way, I restored a good version of them from my backup, so the only real issue is the wasted disk space - a whole 0.15% of my drive.

I looked into the ICACLS command and need to study it more closely to see if it can help me. I'll probably also dig into some Cygwin forums to see if there is another non-Windows way to solve this (short of booting into Linux).
 

rodr

Well-known member
I'm pretty sure it's an ACL thing, and icacls /reset seems the obvious thing to try at this point.

Cygwin is built on the Windows API and will not be very helpful with Windows internal stuff.
 

ScottRNelson

Mr. Dual Sport Rider
Just curious, was there a resolution to this?
Files parked out of the way and just forget about the wasted disk space.

Someday I may get interested in trying something else, but it's not worth additional time at this point.
 
Top