A Windows XP help forum. PCbanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » PCbanter forum » Microsoft Windows 7 » Windows 7 Forum
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Why CAN I delete files marked Read-only without confirmation?



 
 
Thread Tools Rate Thread Display Modes
  #16  
Old April 30th 17, 05:12 PM posted to alt.windows7.general
Mark F[_3_]
external usenet poster
 
Posts: 96
Default Why CAN I delete files marked Read-only without confirmation?

On Fri, 28 Apr 2017 17:23:40 -0400, Paul
wrote:

Mark F wrote:
Why am I able to delete files marked Read-only?

I am using Windows 7 Professional, but I think the problem
happens with more programs on Windows 10.

The problem happens with Standard users and Administrator users
on Windows 7 and Windows 10.

On Windows XP typically the delete operation fails, but with some
programs you are asked if you want to delete the file.

On Windows 7 files are deleted without extra warning if you select
them on the desktop or in a My Computer window. (Depending on various
settings you may be asked to confirm movement to Recycle Bin, but you
get the same message if the file is not marked Read-only as when the
file is marked Read-only.

Some programs, such as Notepad on Windows 7 will not let you
replace a Read-only file, even though you own it, which is the same
way it worked in Windows XP. However, I think that on Windows 10
some of the programs that work correctly on Windows 7 will delete
Read-only files without giving a warning if the process owns the
file

Another change in behavior is for Explorer:
1. Open a window with for the folder with the Read-only file
2. Open another window for a different directory on the same disk
3. Select the file in the first window and then right-click and choose
"Cut"
4. Go to the second window and "Paste"
Windows XP will complain about trying to move a Read-only file;
Windows 7 and Windows 10 will move the file silently (I don't know
about Windows 8.)

File systems are fun. Let's look at some of the
sources of that fun.

*******

File attributes can be read with

fsutil usn readdata Y:\Windows\Logs\CBS\CBS.log

Constants - the following attribute values are returned by the GetFileAttributes function:

FILE_ATTRIBUTE_READONLY = 1 (0x1) ----
FILE_ATTRIBUTE_HIDDEN = 2 (0x2)
FILE_ATTRIBUTE_SYSTEM = 4 (0x4)
FILE_ATTRIBUTE_DIRECTORY = 16 (0x10)
FILE_ATTRIBUTE_ARCHIVE = 32 (0x20)
FILE_ATTRIBUTE_NORMAL = 128 (0x80)
FILE_ATTRIBUTE_TEMPORARY = 256 (0x100)
FILE_ATTRIBUTE_SPARSE_FILE = 512 (0x200)
FILE_ATTRIBUTE_REPARSE_POINT = 1024 (0x400)
FILE_ATTRIBUTE_COMPRESSED = 2048 (0x800)
FILE_ATTRIBUTE_OFFLINE = 4096 (0x1000)
FILE_ATTRIBUTE_NOT_CONTENT_INDEXED = 8192 (0x2000)
FILE_ATTRIBUTE_ENCRYPTED = 16384 (0x4000)

On directories, the READONLY bit is "overloaded".

I am only considering the case of files in folders that are not
marked READONLY.

Attributes are separate from permissions.
Use "Properties" on an item and look at the
security tab. The security tab plays a part
in deletion.

I hadn't thought about this. I checked on Windows 7
Properties tab "Security" for a file tab "General" Attribute
Read-only show as Allow with a grayed out checkmark for
everything but "Special permissions" (which is blank) and that
everything under "Deny" is blank.
(The tab "Security" entries are the same is Attribute "Read-only"
has no checkmark.)

Does this mean that Windows 7 (and 10) work correctly? And therefore
I should change the Security entries to Deny "Modify" and "Write",
and perhaps some other things for all entries in tab "Security"
"Group or user names", whenever I put a checkmark in tab "General"
for Attribute Read-only and remove the Deny entries when I remove
the checkmark for the Read-only Attribute?

*******

For file locking, there are "advisory" and
"mandatory" file locks....

File locking is not an issue for the Attribute Read-only that
I am concerned about in this thread. (Perhaps Windows 7 or some
programs lock things differently than on Windows XP, but I don't
notice that for the simple operations that I do, in with the Read-only
attribute on a file stopped me from being able modify or delete
a file or move it to another location without the operation either
failing completely or having to confirm the operation before it
happens.
(leaving out discussion of locks)

....
At a guess, the most likely thing to break an attempt
to delete is "ownership permissions". Changing the
permissions using the Security tab, might be all it
needs. Note that permissions in the Security tab
can be "inherited" from permissions "above" the item.
Permissions also include Allow and Deny capabilities.
It is best practice to never use Deny in a permission
chain. The end result is, it can be practically
impossible for an "ordinary" user to figure out
why something won't delete :-) I've had cases where
I've spent an hour on this stuff, and not been able
to figure out what permission is "stuffed".

Yes, thus I am upset that Attribute "Read-only" seems to
work differently in Windows 7 than in Windows XP.
Have fun,
Paul

Ads
  #17  
Old April 30th 17, 07:09 PM posted to alt.windows7.general
Char Jackson
external usenet poster
 
Posts: 10,449
Default Why CAN I delete files marked Read-only without confirmation?

On Sat, 29 Apr 2017 14:21:59 -0500, VanguardLH wrote:

tesla sTinker wrote:

I cant believe u people with all this crazy use the dos stuff.
Or even the silly w explorer....

Just use this.... Its so much easier than to worry about any of that
read only thing or whether its released its handle, or even if you not
in the right path, It works always, with none of the worry hassel of
when do I do it?
Smart File Delete. Tiny little program that gets rid of it....put the
icon on dsktp. And just about all of this guys stuff, is more than
worth having.

h**p:// www. novirusthanks. org/


I don't add more software when what is already available does work.
'dir' works. So does Windows Explorer. Don't need more software.


tesla sTinker has posted that site before. It must be one of his
favorites or something. I have no plans to check it out.

--

Char Jackson
  #18  
Old April 30th 17, 11:54 PM posted to alt.windows7.general
tesla sTinker
external usenet poster
 
Posts: 134
Default Why CAN I delete files marked Read-only without confirmation?



On 4/30/2017 11:09 AM, Char Jackson scribbled:
On Sat, 29 Apr 2017 14:21:59 -0500, wrote:

tesla wrote:

I cant believe u people with all this crazy use the dos stuff.
Or even the silly w explorer....

Just use this.... Its so much easier than to worry about any of that
read only thing or whether its released its handle, or even if you not
in the right path, It works always, with none of the worry hassel of
when do I do it?
Smart File Delete. Tiny little program that gets rid of it....put the
icon on dsktp. And just about all of this guys stuff, is more than
worth having.

h**p:// www. novirusthanks. org/


I don't add more software when what is already available does work.
'dir' works. So does Windows Explorer. Don't need more software.


tesla sTinker has posted that site before. It must be one of his
favorites or something. I have no plans to check it out.



what? What works? the new op systems do not work no they don't. Nor
will they, the way they are programmed of. I did think you did not have
brains yes, from reading your other posts.. Certainly hope no one
listens to you.... And certainly do not hope they listen to Bill Gates....


  #19  
Old April 30th 17, 11:59 PM posted to alt.windows7.general
tesla sTinker
external usenet poster
 
Posts: 134
Default Why CAN I delete files marked Read-only without confirmation?

what? What works? the new op systems do not work no they don't. Nor
will they, the way they are programmed of. I did think you did not have
any brains yes, from reading your other posts.. dir? Certainly hope no
one listens to you.... And certainly hope they do not listen to Bill
Gates....



On 4/29/2017 12:21 PM, VanguardLH scribbled:
tesla wrote:

I cant believe u people with all this crazy use the dos stuff.
Or even the silly w explorer....

Just use this.... Its so much easier than to worry about any of that
read only thing or whether its released its handle, or even if you not
in the right path, It works always, with none of the worry hassel of
when do I do it?
Smart File Delete. Tiny little program that gets rid of it....put the
icon on dsktp. And just about all of this guys stuff, is more than
worth having.

h**p:// www. novirusthanks. org/


I don't add more software when what is already available does work.
'dir' works. So does Windows Explorer. Don't need more software.

  #20  
Old May 1st 17, 12:29 AM posted to alt.windows7.general
VanguardLH[_2_]
external usenet poster
 
Posts: 10,881
Default Why CAN I delete files marked Read-only without confirmation?

tesla sTinker wrote:

what? What works? the new op systems do not work no they don't. Nor
will they, the way they are programmed of. I did think you did not have
any brains yes, from reading your other posts.. dir? Certainly hope no
one listens to you....


Folks, we have a child that found Usenet. No point in arguing with
children.

And certainly hope they do not listen to Bill Gates....


Yep, total absence of logic by this child. He argues for additional
software that runs ... where?
  #21  
Old May 1st 17, 04:36 AM posted to alt.windows7.general
B00ze
external usenet poster
 
Posts: 472
Default Why CAN I delete files marked Read-only without confirmation?

On 2017-04-29 00:11, Mark Lloyd wrote:

On 04/28/2017 08:59 PM, B00ze wrote:

[snip]

I'm not sure if the behaviour has changed but in my opinion, if it HAS
changed and we no longer get a warning when deleting a ReadOnly file
then that is a GOOD thing! Try deleting a folder with all kinds of files
inside --- "Are you sure? It's Read Only," "Are you sure? It's system,"
"Are you sure? It is Monday," "Are you sure..." --- Freaking pain in the
behind.

Regards,


"Are you sure?" on a delete is NOT just as good as having an undelete
command. With "Are you sure?", responding to that becomes part of the
delete process rather than a separate "stop and think" point.


Yup, that is why we have the trashcan. No amount of Are-You-Sure will
ever be enough. On my good old Amiga, with DiskMasterII, the
Are-You-Sure prompt could be ack'ed with spacebar; it didn't take long
for me to learn to press D+Spacebar rapidly to delete stuff. And then to
curse when I'd deleted something I didn't mean to lol.

I remember a command-driven editor, where the normal end command was 'E'
(save file and exit). There was also the 'Q' command (exit without
saving). 'Q' was followed by "Are you sure? (Y/N). I hadn't used it long
before I learned that the quit command was really 'QY', and so got no
benefit from "Are you sure?".

That was keyboard. The same holds true for the mouse. It's TWO clicks to
delete a file.


Exactly. But Windoze is really annoying in that it brings-up the prompts
(plural) in the middle of deleting, as it encounters a file of a type or
other. There's no way to start a big delete and then go get coffee; you
have to stay there in order to ack the prompts as they appear...

Regards,

--
! _\|/_ Sylvain /
! (o o) Memberavid-Suzuki-Fdn/EFF/Red+Cross/SPCA/Planetary-Society
oO-( )-Oo "640K ought to be enough for anyone." -Gates

 




Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off






All times are GMT +1. The time now is 03:47 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PCbanter.
The comments are property of their posters.