none
Can't delete Network Folder using Windows 7 - Works in XP!

    Question

  • Hello,

    Using my user account I am able to view a series of profiles created when users log in via Citrix.  These profiles are on a network share which I access by the UNC path.  From time to time when the user is having Citrix issues we rename the users profile so that a new one is created when the user logs in.  We then delete the renamed folder after we verify that the issue has been resolved.

    Here's the problem:  When performing this function from a Windows XP or Windows 2003 machine everything works fine.  When trying this from a Windows 7, Vista, or Server 2008 box the deletion fails with the following security error:

    You need permission to perform this action

    You require permission from Administrators to make changes to the following folder
         Application data

    The way I see it, this cannot be a permissions issue since the same account is being used in both cases, the only thing that changes is the operating system being used.  I suspect this is related to User Account Control settings, however in Windows 7 I have used the slider to try both the highest and lowest security settings with the same error.  In almost all cases UAC is turned off entirely on 2008 Server, and Windows 7 - but again I've tried it on and off.

    I have tried seizing ownership of the folder and all it's contents and subdirectories,  but the deletion still errors out.  (But as I said earlier, I still don't think this is the issue).  I've also used the run-as command to launch Explorer.exe as the local administrator, however this has not worked either.  I've done several searches for this on the Internet and I haven't found anything that really matches this issue.  Has anyone seen this before or could you try to suggestion something?

    Thanks.
    Monday, September 28, 2009 5:28 PM

Answers

  • FIXED IT!

    This took a considerable amount of troubleshooting but I was able to first find a workaround and also isolate the issue to the Firmware level on one of our EMC SANs.  The workaround is as follows:

    RESOLVING PROFILE DELETION ISSUE ON AN EMC SAN (Affects Windows 7, Vista, Server 2008, older OS's are NOT affected)

    1.        Create a drive mapping to the affected share location, EG \\EMCSAN1\tsprofiles

    2.       Open a command prompt and navigate to the drive mapped in step 1.  Change directory into the profile which has been targeted for deletion, EG y:\tsprofiles\myprofile

    3.       **  ENSURE that you are in the correct users directory ** Run the following command:
    attrib –r –s –h /S /D

    4.       This will remove the read-only, system, and hidden tags from all folders and subfolders in the directory.  Note that this must be performed from the command line because the same operation fails by design from the explorer GUI as described here:
    http://support.microsoft.com/default.aspx/kb/326549

    5.       Exit from the command line (if the command line still has the directory open deleting from the GUI will still fail)

    6.       Delete the profile from \\EMCSAN1\tsprofiles\ using windows explorer



    The reason that this is necessary is because there is a known issue deleting folders with the read-only tag set From new Windows OS's (Window 7, Vista, 2003 Server) as described here:

    Knowledgebase Solution    

    Environment:     Product: Celerra All

    Environment:     EMC SW: NAS Code 5.6.39.5 and earlier

    Environment:     OS: Microsoft Windows Vista

    Problem:           Windows Vista clients cannot delete files marked with the read-only attribute, but could when using other Windows versions.

    Problem:           "Access denied" on trying to delete folder from Windows Vista clients

    Root Cause:      When a read-only folder is attempted to be deleted from Windows, Windows will respond with a "STATUS_CANNOT_DELETE" error message, which triggers Vista (and other versions of Windows) to attempt to clear the read-only attribute and try the delete again. Celerra instead responds with "STATUS_ACCESS_DENIED," which triggers Windows 2000 and XP to attempt to clear the read-only bit, but not Vista.

    Fix:       NAS 5.5 code family:

    The issue is fixed in NAS code 5.5.38.0 and later.

    NAS 5.6 code family:

    This issue is fixed in NAS code 5.6.42.1 and later.

    Notes:   This is not the issue described in emc179232. That solution relates to problems deleting files, while this relates to problems deleting folders with the RO bit set. Consequently, this issue stems from a different code path and was fixed in a different level of code.

    • Proposed as answer by toomanyrequests Wednesday, October 07, 2009 1:44 PM
    • Marked as answer by Novak Wu Wednesday, November 04, 2009 9:54 AM
    Tuesday, October 06, 2009 5:56 PM

All replies

  • Any suggestions anyone?  This issue is still ongoing and I'm fresh out of ideas.  I'm also getting a different error when I try to take ownership of this folder.  There is no problem with the parent folder, in fact if I move the files into another folder I can then delete the original folder (ie dbutch1976.contoso.local)  However even after the files have been moved out of the folder they still cannot be deleted.  Many of these subfolders are created by Windows when users profile is created after they log in for the first time, for example favorites and desktop.  If these subfolders exist then the parent folder cannot be deleted.

    Again, let me stress, this issue does not occur in XP, 2003 or any lower level system.  As a work around I'm presently logging into one of those machines with the exact same account and can delete the folder no problem.  

    Additionally, I have attempted to take ownership of the parent folder and all subfolders and I've gotten the error:

    Unable to set new owner on %1. You do not have the Restore privilege required to set this user/group as owner.

    Again, does not happen on downlevel OS's.

    When I do a search on that error it links me to this:

    http://www.win7dll.info/aclui_dll.html - aclui.dll

    From what I can find out about aclui.dll it is responsible for discretionary access control list (DACL) or the system access control list (SACL).

    I really think this is related to my issue but I'm kind of stuck!

    Tuesday, September 29, 2009 7:54 PM
  • I am having the exact same issue.  Anyone else?  I've tried all the same steps as above with similar results.  The profiles I'm trying to delete are hosted on a NAS.  What type of storage are you using?  If this is an issue with UAC then surely someone out there must have seen this before...
    Thursday, October 01, 2009 2:52 PM
  • FIXED IT!

    This took a considerable amount of troubleshooting but I was able to first find a workaround and also isolate the issue to the Firmware level on one of our EMC SANs.  The workaround is as follows:

    RESOLVING PROFILE DELETION ISSUE ON AN EMC SAN (Affects Windows 7, Vista, Server 2008, older OS's are NOT affected)

    1.        Create a drive mapping to the affected share location, EG \\EMCSAN1\tsprofiles

    2.       Open a command prompt and navigate to the drive mapped in step 1.  Change directory into the profile which has been targeted for deletion, EG y:\tsprofiles\myprofile

    3.       **  ENSURE that you are in the correct users directory ** Run the following command:
    attrib –r –s –h /S /D

    4.       This will remove the read-only, system, and hidden tags from all folders and subfolders in the directory.  Note that this must be performed from the command line because the same operation fails by design from the explorer GUI as described here:
    http://support.microsoft.com/default.aspx/kb/326549

    5.       Exit from the command line (if the command line still has the directory open deleting from the GUI will still fail)

    6.       Delete the profile from \\EMCSAN1\tsprofiles\ using windows explorer



    The reason that this is necessary is because there is a known issue deleting folders with the read-only tag set From new Windows OS's (Window 7, Vista, 2003 Server) as described here:

    Knowledgebase Solution    

    Environment:     Product: Celerra All

    Environment:     EMC SW: NAS Code 5.6.39.5 and earlier

    Environment:     OS: Microsoft Windows Vista

    Problem:           Windows Vista clients cannot delete files marked with the read-only attribute, but could when using other Windows versions.

    Problem:           "Access denied" on trying to delete folder from Windows Vista clients

    Root Cause:      When a read-only folder is attempted to be deleted from Windows, Windows will respond with a "STATUS_CANNOT_DELETE" error message, which triggers Vista (and other versions of Windows) to attempt to clear the read-only attribute and try the delete again. Celerra instead responds with "STATUS_ACCESS_DENIED," which triggers Windows 2000 and XP to attempt to clear the read-only bit, but not Vista.

    Fix:       NAS 5.5 code family:

    The issue is fixed in NAS code 5.5.38.0 and later.

    NAS 5.6 code family:

    This issue is fixed in NAS code 5.6.42.1 and later.

    Notes:   This is not the issue described in emc179232. That solution relates to problems deleting files, while this relates to problems deleting folders with the RO bit set. Consequently, this issue stems from a different code path and was fixed in a different level of code.

    • Proposed as answer by toomanyrequests Wednesday, October 07, 2009 1:44 PM
    • Marked as answer by Novak Wu Wednesday, November 04, 2009 9:54 AM
    Tuesday, October 06, 2009 5:56 PM
  • Just checking with our storage guys to verify this, but I can confirm the workaround works for sure.  Thanks for the help!
    Wednesday, October 07, 2009 1:45 PM
  • does this only happen on EMC's SAN?
    Wednesday, November 25, 2009 7:28 AM
  • Got the same error on a netapp-filer.
    Workaround works, too.

    Edit: Feedback from our storage dep. This is a know error on netapp filers with older ontap versions

    Solution ID: kb41547

    Last updated: 12 FEB 2009


    Access denied when trying to delete a "Read Only" folder from Microsoft Vista using Windows Explorer


    Symptoms

    When deleting a directory from a share using Microsoft Vista the following error is generated:

    Destination Folder Access Denied
    You need permission to perform this action
    <folder name>
    Type: File Folder
    Date modified: 6/5/2008 12:00 AM

    Access denied when trying to delete a "Read Only" folder from Microsoft Vista using Windows Explorer


    Cause of this problem

    BUG 298944 (Bug details)

    The Read Only attribute is set on the Folder. Using the GUI to remove the "Read Only" attribute does not resolve the issue. Microsoft Vista is able to successfully delete a folder with the "Read Only" attribute set when hosted on a Windows Server.


    Solution

    The "Read Only" attribute will need to be removed before deleting a directory. Windows 2003, XP and Vista are not able to modify the Attributes of Folders using Windows Explorer. They will need to be modified using the Attrib command. For steps on using Attrib please see following Microsoft KB Article 326549: You cannot view or change the Read-only or the System attributes of folders in Windows Server 2003, in Windows XP, or in Windows Vista.

    This only impacts Microsoft Vista clients. Windows XP clients are still able to delete folders from a Filer with the "Read Only" attribute set.

    Workaround:
    Use options cifs.perm_check_ro_del_ok.


    Environment

    NetApp filer

    Data ONTAP 7G and earlier

    CIFS

    Wednesday, November 25, 2009 3:56 PM