Read-Only Folders

J

Jim

I originally posted this in the .NET newsgroup, but now it seems as though
it is more appropriate here. I have a folder that is read-only, and I can't
change it so that it is not read-only. I have tried unchecking the
read-only box, and I have tried giving myself full control over the
directory (even though I am an administrator on the Vista box). Every time
I try to do it, the directory stays as read-only.

Any solutions?

Thanks.
-- Jim


----------------------------------------------------------------------
Well, after doing more reading, it doesn't look like this is just me. This
guy's site:
http://www.followsteph.com/2007/06/17/windows-vista-read-only/
has several references to threads in which people cannot change the
read-only property of a folder. My Google skills are failing me to find the
answer too. Does anybody know why I can't change the read-only property of
a folder on my Vista machine (it's a temporary folder I make in my Debug
directory during debugging)? More importantly, does anybody know how I can
fix this via normal administration and via code (some example code would be
cool too)?

My installation of Vista is just the normal RTM Vista CD from my MSDN
subscription. I setup my account as an administrator, and that's what I'm
logging in with.

Thanks again,
-- Jim



"Jim" <jim.munafo@ngc.com> wrote in message
news:151b5$469e8a1a$d8447f26$25689@FUSE.NET...
>I have the following piece of code:
>
> Directory.CreateDirectory(myDir)
> DirectoryInfo lDir = new DirectoryInfo(myDir)
> lDir.Attributes = FileAttributes.Normal
>
> When this code runs, my directory is created fine, but my directory is
> always read only. At first I thought it was something with using
> DirectoryInfo. However, I also ran the following line of code:
>
> Directory.CreateDirectory(myDir)
>
> Immediately after running this line of code, my directory was created, and
> then I went and manually tried to change the attributes of the directory
> so that it was not read only. Even after I tried to set it manually, it
> would always be read only. I never received back an error after I pushed
> OK on the directory properties after unchecking read only, but every time
> I go back to the properties of the folder it is always read only?
>
> This is running on Windows Vista. Any ideas why?
>
> Thanks,
> -- Jim
>
>
 
J

Jimmy Brush

Jim wrote:
> I originally posted this in the .NET newsgroup, but now it seems as though
> it is more appropriate here. I have a folder that is read-only, and I can't
> change it so that it is not read-only. I have tried unchecking the
> read-only box, and I have tried giving myself full control over the
> directory (even though I am an administrator on the Vista box). Every time
> I try to do it, the directory stays as read-only.
>
> Any solutions?
>
> Thanks.
> -- Jim
>


Hello,

The read-only checkbox is irrelevant for folders. Notice it is filled in
with a square as opposed to a check, which indicates that it is NOT
checked but rather in an 'indeterminate' state.

If you are having folder access issues, it is because of the security
permissions on the folder.

The checkbox is there only so that you can easily set or clear the
read-only attribute on the files inside of that folder.

- JB
 
Back
Top Bottom