PDA

View Full Version : Drag-and-drop removes permissions (and who knows what else)


Angus
December 5th 03, 08:07 PM
For a while now I've had this problem where files spontaneously become
inaccessable, as though there is an exclusive lock on them. When I
learned that there weren't any processes that had these files open, I
discovered that booting in safe mode allowed me to set the permissions
and ownership and such correctly. This problem seems to be caused by
drag-and-dropping files and folders.

On the Security property page (when in safe mode) there are no
permissions for anyone listed, on these files. So I Add myself, and
guess at who else I should add (like non-users). Only then do I get
*my* own intellectual property.

I have XPHESP1, which is why I have to boot in safe mode everytime
I have this problem. That is not an acceptable solution. I have all
the patches at WindowsUpdate so far. I've also searched the groups for
this problem, and it seems common enough, but the solutions aren't
very clear, or don't include much beyond correcting the problem after
it has already happened. How do I stop dragging from screwing with the
permissions and who knows what other attributes?

Some seem to think that partitions are at issue. This is all done
within one partition. But I'll do an experiment right now: I'll try
dragging from C: to D:...
It seems that dragging isn't the copy and delete that the cut and
paste are, in this case--just the copy. Well, both files are
accessible.

GSV Three Minds in a Can
December 5th 03, 08:08 PM
Bitstring >, from the
wonderful person Angus > said
<snip>
> Some seem to think that partitions are at issue. This is all done
>within one partition. But I'll do an experiment right now: I'll try
>dragging from C: to D:...
>It seems that dragging isn't the copy and delete that the cut and
>paste are, in this case--just the copy. Well, both files are
>accessible.

The XP rules on what permissions a file picks up are really complex, but
in the simplest case of copying a file from an NTFS drive to someplace
else on the same drive, the new copy is supposed to inherit the
permissions of the folder it gets put into (with whoever moved it as the
owner/creator).

If you MOVE it instead, it retains the original permissions, and you
become the creator/owner of the moved file.

If you move it from one drive to an NTFS drive, it acts like a 'copy'
... i.e. inherits the permissions from the folder it arrives in, with you
as the creator/owner.

If you move it to a FAT32 drive, all bets are off - no such thing as
permissions.

btw, since this is 'home', the whole permissions thing should be a
no-op, and you should be running just with Simple File Sharing .. unless
you (or some application) has done wicked things to the registry.

--
GSV Three Minds in a Can
Outgoing Msgs are Turing Tested,and indistinguishable from human typing.

Michael Howard [MSFT]
December 5th 03, 08:08 PM
as a general rule - copying will inherit the ACLs of the destination
container. while, moving maintains the ACLs on the file being copied.

--

Cheers, Michael
Writing Secure Code 2nd Edition
(http://www.microsoft.com/MSPress/books/5957.asp)

This posting is provided "AS IS" with no warranties, and confers no rights.
OR if you wish to include a script sample in your post please add "Use of
included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm"
"Angus" > wrote in message
om...
> For a while now I've had this problem where files spontaneously become
> inaccessable, as though there is an exclusive lock on them. When I
> learned that there weren't any processes that had these files open, I
> discovered that booting in safe mode allowed me to set the permissions
> and ownership and such correctly. This problem seems to be caused by
> drag-and-dropping files and folders.
>
> On the Security property page (when in safe mode) there are no
> permissions for anyone listed, on these files. So I Add myself, and
> guess at who else I should add (like non-users). Only then do I get
> *my* own intellectual property.
>
> I have XPHESP1, which is why I have to boot in safe mode everytime
> I have this problem. That is not an acceptable solution. I have all
> the patches at WindowsUpdate so far. I've also searched the groups for
> this problem, and it seems common enough, but the solutions aren't
> very clear, or don't include much beyond correcting the problem after
> it has already happened. How do I stop dragging from screwing with the
> permissions and who knows what other attributes?
>
> Some seem to think that partitions are at issue. This is all done
> within one partition. But I'll do an experiment right now: I'll try
> dragging from C: to D:...
> It seems that dragging isn't the copy and delete that the cut and
> paste are, in this case--just the copy. Well, both files are
> accessible.

Angus
December 5th 03, 08:10 PM
GSV Three Minds in a Can ]> wrote in message >...
> Bitstring >, from the
> wonderful person Angus > said
> <snip>
> > Some seem to think that partitions are at issue. This is all done
> >within one partition. But I'll do an experiment right now: I'll try
> >dragging from C: to D:...
> >It seems that dragging isn't the copy and delete that the cut and
> >paste are, in this case--just the copy. Well, both files are
> >accessible.
>
> The XP rules on what permissions a file picks up are really complex, but
> in the simplest case of copying a file from an NTFS drive to someplace
> else on the same drive, the new copy is supposed to inherit the
> permissions of the folder it gets put into (with whoever moved it as the
> owner/creator).

All of the following rules you describe are standard, and would
have come to no surprise to me if I'd been confronted by them. My
problem is very different from the rules. This dragging-style move
causes all permissions on the file to be revoked. That is clearly
wrong and inconvenient. Needless to say, this is NTFS, and yes, I am
using simple file whatever. If something wickedly bad was done to my
registry, I'm not aware of it.


>
> If you MOVE it instead, it retains the original permissions, and you
> become the creator/owner of the moved file.
>
> If you move it from one drive to an NTFS drive, it acts like a 'copy'
> .. i.e. inherits the permissions from the folder it arrives in, with you
> as the creator/owner.
>
> If you move it to a FAT32 drive, all bets are off - no such thing as
> permissions.
>
> btw, since this is 'home', the whole permissions thing should be a
> no-op, and you should be running just with Simple File Sharing .. unless
> you (or some application) has done wicked things to the registry.

Google