Tech Off Thread

18 posts

Weird file system problem - access denied after moving files

Back to Forum: Tech Off
  • User profile image
    dentaku

    I know this isn't a tech support forum (I'm going to ask this question on other forums too) but since I'm already a C9 member and there are many smart people who understand NTFS etc. around here I thought I'd ask.

    --------------------------------------------------------

    I have a strange problem with an NTFS formatted drive running XP PRO on which I am the only user so I'm assuming I'm always running as admin.
    I can Copy the Paste files and they still work fine but if I try to MOVE a file (by dragging it) the file will become inaccessible and I won't even be able to delete it unless I go into the command prompt and use the DEL command on it.

    For Example:
    XP gives me this error message if I try to delete the newly moved file
    Error Deleting File or Folder
    Cannot delete xxxxxxx: Access is denied.
    Make sure the disk is not full or write-protected
    and that the file is not currently in use

    The same thing happens if I try and rename it.

    This is what happened the day before I noticed this problem and is obviously what caused this whole mess.

    I have 2 harddrives, Primary Master has XP on it and Primary Slave has Vista Beta 2. My motherboard lets me chose which drive to boot from by pressing an F key before the OS boots so I didn't have to mess with boot loaders or partitioning.

    This weekend I booted into Vista and everything was very slow because last time I used it it went into hibernate mode and I couldn't un-hibernate so I rebooted back into XP and forgot about it.
    Heres' where everything started going wrong. Because it was so slow after resuming from hibernate I restarted to get Vista running back at normal speed and left the room and for some reason Checkdisk started running (unfortunately I wasn't there to stop it ) and I'm not sure which drive it was scanning but it first did
    "inserting and index entry into $0 of file 25" over and over again, then eventually
    "replacing invalid security id with default security id for file ......." for a very long time so I just stopped it, hoping it was just scanning the Vista drive because I don't care what happens to it. I wouldn't dare interrupting a Checkdisk on an important drive.

    I then restarted and skipped the Chkdsk for both drives and Vista was running OK again.
    I restarted back into XP and Chkdsk ran again. This time I decided to let it do it's thing on the XP drive. It took MANY hours and scanned every file doing the "replacing invalid security id with default security id" thing all over again.
    I wish Chkdsk would wait for the user to answer instead of just counting down and doing whatever it wants if nobody's around to stop it.

    Luckily XP started up fine again but the next day I noticed that annoying problem with losing access to any moved files.

    Is there something simple I can do that will let me move files again without fear of completely losing access to them?

  • User profile image
    dentaku

    I figured this post would have lots of reads but no replies Smiley
    Like I said, I know this isn't tech support but I was just taking a chance that someone here knew how to fix it before I just format the drive and start all over again. I just have to be careful not to MOVE anything.

    chkdsk can be dangerous I guess

  • User profile image
    AndyC

    Since you mentioned dual booting, are you moving files between the two drives? Because the security descriptors from Vista won't have valid SIDs under XP and likewise going the other way.

    The exact semantics of how NT handles permissions are different between moving and copying IIRC, though my memory is a little rusty.

  • User profile image
    dentaku

    I did move a large folder from the desktop of my XP drive to the root of the Vista drive  (it was the entire ToCa Race Driver 3 folder) but that was quite a while ago.
    It's weird that Chkdsk would suddenly decide to mess with my drives only now.

    HEY! I just tested out something before posting the rest of this message and it turns out that it works fine if I move stuff in a folder in the root of C: but it messes up if I do it from a folder on the Desktop or in My Documents.

    SO, it seems to only happen to files within C:\Documents and Settings\dentaku\

    Hmmm... I'm slowly finding more and more about this situation all the time.

  • User profile image
    Cannot​Resolve​Symbol

    My Documents has some weird permissions set on it (that wouldn't normally be on a file in C:\), designed to restrict access to anyone but the original users.  Permissions for everyone else (including the administrator on the XP drive) look like this:

    Image Hosted by ImageShack.us

    You can't do anything with the file, because the account referred to by the SID in its permissions doesn't exist, and no one else can do anything to the file.  However, as an administrator, you can fix it.

    On the Security tab of the file or folder you moved's properties sheet, click "Advanced".  Change to the "Owner" tab and change the owner to you.  An administrator can do this regardless of the "Take Ownership" permission, since they are admin and have full control over the machine.  Press OK and if it prompts you to apply it to child objects or subfolders (I forget the exact wording), say yes.

    Back on the security tab on the file's properties sheet, click "Add" and type your username in the "Enter object names to select" field.  Give yourself full control, and you should be able to do anything you want with the file (move, copy, delete, edit, open, etc.).

    [EDIT] I would advise you to not let chkdsk in Vista run on the XP drive (and vice versa), and especially not let it mess around with SIDs on it...  all the XP SIDs will always be invalid when running under Vista.  Fixing them would be (to say the least) bad.  It might not mutilate anything, but if it did, it could make your system inoperable.

  • User profile image
    dentaku

    That's pretty good information. When I don't have anyting important on this drive because I'm done with the projects I'm working on I will have to try that.
    I want to do it to the entire /dentaku folder which of course is where Desktop and My Documents are.

    It's time I re-installed the OS on this machine anyway (it's been going fine for a few years) but just out of curiosity I'd still like to see if I can fix it first Wink

  • User profile image
    Cannot​Resolve​Symbol

    I wouldn't do it to your whole user directory (it would take a long time, for one)...  this is just to fix files you've moved from one drive to the other.

  • User profile image
    dentaku

    CannotResolveSymbol wrote:
    I wouldn't do it to your whole user directory (it would take a long time, for one)...  this is just to fix files you've moved from one drive to the other.


    Well you see, it's not files that I've moved form one drive to another that are messed up. In fact, I don't have anything important that got messed up. It's just an annoyance that from now on this particular install of XP will not be able to use drag and drop to move anything in folders within the /dentaku/ folder because it will then lock me out them.

    I'm thinking of just making a new user account and seeing if it works while I'm logged in that way but at the moment I'm not going to mess with stuff like that in case it just causes more problems.
    I'll have to do that after there's nothing important being done on it.

  • User profile image
    prog_dotnet

    there are 3 things to know when copying/moving
    files on a ntfs partions/volume

    1. copy will create a new file and permissions
    to that file are inherited from the parent (root or folder )

    2. moving files on the same partion only updates the the reference
    to the objekt itself and the permissions are unchanged(internally)

    3. moving files on a different partion will copy the file to the new
    drive, (creating a new file)inheriting permissions set on the parent, and the old file are deleted.

    You made a move to the other drive, that is...a new file is created inheriting the parent permissions.

    The parent permissions on the other drive is set with the dacl
    (discretionary access control list ) that contains the ntfs rights for the users on the vista install, that have different sids ( that is
    a uniqe id for every user on the system)
    the sid on the vista install does not match the sid on the xp install, and xp cant locate any user with the corresponding sid...givng you a access denied message.
    ( the dacl contains a header, a sid(user the rights belongs to) and any access control enteties)

    There are on simple solution.  On the target drive, explicilty add you account to the parent folder that you want to move files to, and give the account full control. Any subsequent moves to that folder, wil then inherit the parent permissions containing the sid (your user on the xp install)

  • User profile image
    Steve411

    I usually get this when im moving a folder which contains a file that's larger than 500 or some megs in size. The write process on some disks to complete this slows down after a while would be my guess.

    .... that's why they recommend disk defragmenting!!

    - Steve

  • User profile image
    dentaku

    prog_dotnet wrote:
    

    there are 3 things to know when copying/moving
    files on a ntfs partions/volume

    1. copy will create a new file and permissions
    to that file are inherited from the parent (root or folder )

    2. moving files on the same partion only updates the the reference
    to the objekt itself and the permissions are unchanged(internally)

    3. moving files on a different partion will copy the file to the new
    drive, (creating a new file)inheriting permissions set on the parent, and the old file are deleted.

    You made a move to the other drive, that is...a new file is created inheriting the parent permissions.



    You know, that's how I figured it works.
    That some good information prog_dotnet, thanks.

    The funny thing about this whole thread is that people are all assuming I have a problem with files moved over to the Vista drive when in fact I don't. I dont even have the Vista dirve plugged in at the moment. Big Smile

  • User profile image
    RickHole

    Mine is a somewhat related problem.  After failing to boot from my C drive, doing a low-level reformat, reloading WinXP (SP2), I am having a difficulty with my second hard drive.  The folder on it named "My Documents" cannot be access.  Clicking to open the file gives "F:\My Documents is not accessable.  Access is denied."

    Properties for that folder indicate 0 files, although the total disk usage indicates the files in that folder are really still there.

    I suspect a permissions problem as this folder had been set to be hidden from other users, and I am now probably an "other" user.

    I should be able to take ownership, however the security tab does not show up.  I am logged in as the only use with administrator priviledges.

    I have seen error messages hinting the the file may be "in use".

    Does anyone have any sugegstion how I can proceed to gain access to my data?  Help!!!

  • User profile image
    AndyC

    RickHole wrote:

    Does anyone have any sugegstion how I can proceed to gain access to my data?  Help!!!

    Firstly, if you have XP Home, you need to be in Safe Mode. If you have XP Pro you need to disable Simple File Sharing in the Folder view options.

    Assuming you've tried that:

    Does the security tab show up at the root of the drive? If so you should be able to take ownrship there and force all child directories to reset to inherited permissions.

    If all else fails CACLS at the command line can probably fix it for you.

  • User profile image
    RickHole

    THANK YOU ANDY!!!  Changing the simple sharing switch enabled the Security Tab and I had my data back in a couple of minutes.  You are an answer to prayer. Thanks again. Rick

  • User profile image
    nickbeentjes

    Hi - Have you found a fix ?
    I had exactly the same problem, but have now worked it out - difference was that mine was associated with an additional drive I have and have my documents pointing to the d: not the normal c:\doc and settin...blah

    If I moved any file on the D: hard drive I got the access denied - when looking at the files, all thier permissions had basically been stripped, but this was the default permissions on the D: root .... after copying the explicit permission set from the C: root to the D: root (you have do do it manually and in safe mode on XP Home) the problem then went away ....

    Regards,

    Nick

  • User profile image
    Cannot​Resolve​Symbol

    nickbeentjes wrote:
    Hi - Have you found a fix ?
    I had exactly the same problem, but have now worked it out - difference was that mine was associated with an additional drive I have and have my documents pointing to the d: not the normal c:\doc and settin...blah

    If I moved any file on the D: hard drive I got the access denied - when looking at the files, all thier permissions had basically been stripped, but this was the default permissions on the D: root .... after copying the explicit permission set from the C: root to the D: root (you have do do it manually and in safe mode on XP Home) the problem then went away ....

    Regards,

    Nick


    That is the fix.  NTFS partitions don't like being moved from machine to machine (or operating system to operating system), because of the way file security works in NTFS.  It's not broken, it's just an inherent issue when limiting file access to one particular user on one particular system.

  • User profile image
    marriealen

    @dentaku:Oh i had the same problem,these files become stacked and are due to long paths,use the tool available at http://pathtoodeep.com ,it is a tool which deletes and also searches such undeleteable files and also assists in installation and sharing of long pathed files

  • User profile image
    teslaBytes

    use robo copy, or just link the dir, to a new dir. make sure the dir is not linked.  you would get the same error.

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.