• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

read-only files

M
#1
if I try to change a file in the program files, an message pops up saying it
can't create the file. I am the admin and the file says it isn't read only
but all the folders
are read only. when I try to change this the properties it says it is read
only again. and even though the files say they are not read only i can't
change them. does anyone knows what is going on?

thanks
 
A

Andrew McLaren

#2
"Mike" <Mike@discussions.microsoft.com> wrote ...
> if I try to change a file in the program files, an message pops up saying
> it
> can't create the file. I am the admin and the file says it isn't read
> only
> but all the folders
> are read only. when I try to change this the properties it says it is
> read
> only again. and even though the files say they are not read only i can't
> change them. does anyone knows what is going on?



Hi Mike,

Are you trying to change the Read Only property for an individual file, or
for a folder?

You should be able to change individual files, as long as you have
permission to the file.

You canot change the Read Only setting for a folder (well, not in Explorer,
anyway). The Read Only property on a folder is totally ignored by Windows,
for determining whether you can read, write or modify the contents of the
folder. You canot prevent or allow access to files by changing the Read Only
flag on a folder.

(so, why does the Property exist? well, Explorer needed a flag to control
how it interacts with folders which exist on network shares. The Read Only
flag for folders already existed and wasn't being used for any purpose, so
Explorer "hijacked" it to work out whether to read remote desktop.ini or
not. This has nothing whatever to do with reading or writing the files in
the folder).

Hope it helps,
--
Andrew McLaren
amclar (at) optusnet dot com dot au
 
M
#3
There is more to the problem. When I try to save a file in program files
(x86) it won't allow me. A message says,"You don't have permission to save
in this locate. Contact the administrator to obtain permission" Also if I
try to modify a file in proram files it says, "Can't create <...> Make sure
the path and file name are correct."
Do you know if it is possible to modify program files or save files in
program files.

"Andrew McLaren" wrote:

> "Mike" <Mike@discussions.microsoft.com> wrote ...
> > if I try to change a file in the program files, an message pops up saying
> > it
> > can't create the file. I am the admin and the file says it isn't read
> > only
> > but all the folders
> > are read only. when I try to change this the properties it says it is
> > read
> > only again. and even though the files say they are not read only i can't
> > change them. does anyone knows what is going on?

>
>
> Hi Mike,
>
> Are you trying to change the Read Only property for an individual file, or
> for a folder?
>
> You should be able to change individual files, as long as you have
> permission to the file.
>
> You canot change the Read Only setting for a folder (well, not in Explorer,
> anyway). The Read Only property on a folder is totally ignored by Windows,
> for determining whether you can read, write or modify the contents of the
> folder. You canot prevent or allow access to files by changing the Read Only
> flag on a folder.
>
> (so, why does the Property exist? well, Explorer needed a flag to control
> how it interacts with folders which exist on network shares. The Read Only
> flag for folders already existed and wasn't being used for any purpose, so
> Explorer "hijacked" it to work out whether to read remote desktop.ini or
> not. This has nothing whatever to do with reading or writing the files in
> the folder).
>
> Hope it helps,
> --
> Andrew McLaren
> amclar (at) optusnet dot com dot au
>
>
>
 
A

Andrew McLaren

#4
"Mike" <Mike@discussions.microsoft.com> wrote ...
> There is more to the problem. When I try to save a file in program files
> (x86) it won't allow me. A message says,"You don't have permission to
> save
> in this locate. Contact the administrator to obtain permission" Also if I
> try to modify a file in proram files it says, "Can't create <...> Make
> sure
> the path and file name are correct."
> Do you know if it is possible to modify program files or save files in
> program files.


Hi Mike

That's correct. By default, standard users do not have permissions to write
or modify files under the C:\Program Files tree. This is by design, and is
one of the security measures in Vista. Writing to and modifying executable
program files is one of the main ways in which computer viruses work. By
preventing this, Vista is cutting off a major attack vector for viruses.

If you have user data of your own, like documents, databases, photos, music,
etc, you should save it under your own user directory. Why are you trying to
write to the Program Files directory?

(Note that some old, poorly designed applications try to write to the
Program Files directory. This is bad design, and the "Designed for Windows"
guidelines have prohibited this for several years before Vista made it
really mandatory. In Vista there is a so-called "virtualisation" mechanism
which is suppoed to kick in when old applications try to modify files under
Program Files - but maybe not working, in your case?)

--
Andrew McLaren
amclar (at) optusnet dot com dot au
 
M
#5
Thanks.
There is something wrong with the program I am trying to run then.

"Andrew McLaren" wrote:

> "Mike" <Mike@discussions.microsoft.com> wrote ...
> > There is more to the problem. When I try to save a file in program files
> > (x86) it won't allow me. A message says,"You don't have permission to
> > save
> > in this locate. Contact the administrator to obtain permission" Also if I
> > try to modify a file in proram files it says, "Can't create <...> Make
> > sure
> > the path and file name are correct."
> > Do you know if it is possible to modify program files or save files in
> > program files.

>
> Hi Mike
>
> That's correct. By default, standard users do not have permissions to write
> or modify files under the C:\Program Files tree. This is by design, and is
> one of the security measures in Vista. Writing to and modifying executable
> program files is one of the main ways in which computer viruses work. By
> preventing this, Vista is cutting off a major attack vector for viruses.
>
> If you have user data of your own, like documents, databases, photos, music,
> etc, you should save it under your own user directory. Why are you trying to
> write to the Program Files directory?
>
> (Note that some old, poorly designed applications try to write to the
> Program Files directory. This is bad design, and the "Designed for Windows"
> guidelines have prohibited this for several years before Vista made it
> really mandatory. In Vista there is a so-called "virtualisation" mechanism
> which is suppoed to kick in when old applications try to modify files under
> Program Files - but maybe not working, in your case?)
>
> --
> Andrew McLaren
> amclar (at) optusnet dot com dot au
>
>
>
 
A

Andrew McLaren

#6
"Mike" <Mike@discussions.microsoft.com> wrote in message
news:32DE6829-79FA-43A9-97CB-BE245C20DEB3@microsoft.com...
> Thanks.
> There is something wrong with the program I am trying to run then.


Here's a good overview of file system virtualisation in Vista:
http://windowsconnected.com/blogs/jerry/archive/2005/12/19/86.aspx

If you know what file and/or directory teh app is trying to write to, you
can grant yourself permissions to that specific file on a file-by-file
basis. Highlight the sub-folder in Explorer, right-click, choose Properties,
then Security, and adjust the permissions using the dialogue which appears.
You have to be very careful, when using this permissions editor - it is easy
to make a mistake and totally trash your system; or worse, weaken the
protection in Vista and leave yourself vulnerable to viruses, trojans etc.
But it can be done - I've had to do this for a few old apps I run.

Alternatively, contact teh vendor of the application you're using, and ask
them how to make their app run on Vista. They may have a patch or upgarde
available.

Good luck with it.

--
Andrew McLaren
amclar (at) optusnet dot com dot au