none
Have rights but cannot delete folder in TFS 2010 version control

    Question

  • Have folder in TFS 2010 that inherits permissions from parent.  I am the team collection administrator as well as the team project administrator.  When I try to delete a folder that has nothing in it, I receive the following error: TF14098: Access Denied: <myDomain>\<myUserAccount> needs Read permission(s) for $/Application.DataWarehouse/Test-branch/*. 

    What's interesting is that it is specifiying a wildcard at the end of the path which may be a key to understanding the behavior.  This branch was made trying to test the following: 

    1. Folder has manage branch rights
    2. File within that folder had that right removed.
    3. Branched the folder
    4. New branched folder was created but did not have the file which did not have the "Manage Branch" permission. (which I expected). 

    When I tried to remove the branch after testing this scenario, I could not do it because of the error mentioned above.

    Any thoughts?

    Thursday, September 09, 2010 4:30 PM

Answers

  • The reason why you can't delete the folder is twofold:

    1. In TFS, you can set permissions on a path, even if there was never any item in that path.  Typically, you can only get in this state through the command line.  In your case, $/Application.DataWarehouse/Test-branch/Dsat.Framework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.HTM happens to have a permission set.

    2. In TFS, you are only allowed to delete/rename paths if you have recursive read permissions underneath the path (that's what the '*' means).  Because deletes and renames are recursive, this is necessary to keep people from messing with items they don't have read permission for.  Because Inherit is No for $/Application.DataWarehouse/Test-branch/Dsat.Framework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.HTM, you don't have read permission.

     

    The fix?  Run tf permission /inherit:yes "$/Application.DataWarehouse/Test-branch/Dsat.Framework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.HTM".  You can also remove the unneeded permission entry for [Application.DataWarehouse]\Contributor with tf permission /remove.

    Wednesday, October 06, 2010 6:17 PM
    Moderator

All replies

  • Hi,

    Did tou check-in all pending changes and get latest version?

    Try run tf permission $/Application.DataWarehouse/Test-branch/ /recursive /collection:<collectionurl> to check whether there is a file is denied Read


    Best regards,
    Ruiz
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com
    Friday, September 10, 2010 4:41 AM
    Moderator
  • There is nothing in the folder to to check-in (it's an empty folder), but yes I have gottten a latest version after confirming there is nothing to check-in from the pending changes dialog.  I have inserted the output of the command you sent below.

     

    ===============================================================================
    Server item: $/Application.DataWarehouse/Test-branch (Inherit: Yes)
      Identity: [Application.DataWarehouse]\Builders
        Allow:            
        Deny:             
        Allow (Inherited): Read, PendChange, Checkin, Label, Lock, Merge
        Deny (Inherited): 

      Identity: [Application.DataWarehouse]\Contributors
        Allow:            
        Deny:             
        Allow (Inherited): Read, PendChange, Checkin, Label, Lock, Merge,
                           ManageBranch
        Deny (Inherited): 

      Identity: [Application.DataWarehouse]\Project Administrators
        Allow:            
        Deny:             
        Allow (Inherited): Read, PendChange, Checkin, Label, Lock, ReviseOther,
                           UnlockOther, UndoOther, LabelOther, AdminProjectRights,
                           CheckinOther, Merge, ManageBranch
        Deny (Inherited): 

      Identity: [Application.DataWarehouse]\Readers
        Allow:            
        Deny:             
        Allow (Inherited): Read
        Deny (Inherited): 

      Identity: [BCI]\Project Collection Administrators
        Allow:            
        Deny:             
        Allow (Inherited): Read, PendChange, Checkin, Label, Lock, ReviseOther,
                           UnlockOther, UndoOther, LabelOther, AdminProjectRights,
                           CheckinOther, Merge, ManageBranch
        Deny (Inherited): 

      Identity: [BCI]\Project Collection Build Service Accounts
        Allow:            
        Deny:             
        Allow (Inherited): Read, PendChange, Checkin, Label, Lock, CheckinOther,
                           Merge, ManageBranch
        Deny (Inherited): 

      Identity: [BCI]\Project Collection Service Accounts
        Allow:            
        Deny:             
        Allow (Inherited): Read, PendChange, Checkin, Label, Lock, ReviseOther,
                           UnlockOther, UndoOther, LabelOther, AdminProjectRights,
                           CheckinOther, Merge, ManageBranch
        Deny (Inherited): 

    ===============================================================================
    Server item: $/Application.DataWarehouse/Test-branch/Dsat.Framework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.HTM (Inherit: No)
      Identity: [Application.DataWarehouse]\Contributors
        Allow:             Read, PendChange, Checkin, Label, Lock, Merge
        Deny:             
        Allow (Inherited):
        Deny (Inherited): 

    Friday, September 10, 2010 10:29 PM
  • Hi,

    >>>Server item: $/Application.DataWarehouse/Test-branch/Dsat.Framework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.HTM (Inherit: No)

    It seems that the folder Test-branch is not empty. What is the file type of Dsat.Framework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.HTM ? A dll or a .htm file? Could you try to delete it first?

    Also I suggest to get specific version (Latest version) and force to override writeable files and all files, so that you can find whether there is other file.


    Best regards,
    Ruiz
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com
    Monday, September 13, 2010 3:25 AM
    Moderator
  • I know it seems that way, but I cannot delete it since it does not show up in TFS Explorer (or my local workspace) even after forcing to overwrite files from the server to my workspace as you suggested.  How do I remove something that does appear to exist with the exception of that command you sent me?  Dsat.Framework is a project located elsewhere in our respository.  I did a wildcard search from the TFS power tools for that name (Dsat.Framework) under our mainline and it never showed it listed under Test-branch as the command above indicated. 

    I have a feeling like the branch is corrupt in some way from the database side of things.  While unsupported, is there a query that I can run that would remove that entry from TFS so that it does not think there should be something there when in fact there isn't anything listed?

    Monday, September 13, 2010 5:29 PM
  • Hi,

    VS=>Toos=>Options=>Source Control=>Visual Studio Team Foundation Server=>check Show Deleted items in the Source Control Explorer, will this file be visible?

     Or run Tf Properties command line to check the file status.

    After all, you can try TF Destroy to remove the branch permanently .


    Best regards,
    Ruiz
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com
    Tuesday, September 14, 2010 7:50 AM
    Moderator
  • Setting option to show Deleted items in the source did not reveal any files.  Running TF Destroy results in the following output:

    TF14098: Access Denied: User <myDomain>\<myUserAccount> needs AdminProjectRights permission(s) for $/Application.DataWarehouse/Test-branch/*.

    Do you have anything I can run against the DB to clear this up?

    Stephen

    Thursday, September 16, 2010 3:49 PM
  • Hi Stephen,

    This issue is very strange, as you mentioned the *.

    Could you find whether a file has such name in [Tfs_<Collection>].[dbo].[tbl_VersionedItem]?

     

     

     

     


    Best regards,
    Ruiz
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com
    Monday, September 20, 2010 9:20 AM
    Moderator
  • I ran the following queries which did not return any results.

    select

     

    * from Tfs_BCI.[dbo].[tbl_VersionedItem] where ParentPath like '%*%' or ChildItem like '%*%'

    select

     

    * from Tfs_BCI.[dbo].[tbl_VersionedItem] where ParentPath like '%Test-branch%' or ChildItem like '%Test-branch%'

    Friday, September 24, 2010 9:42 PM
  • The reason why you can't delete the folder is twofold:

    1. In TFS, you can set permissions on a path, even if there was never any item in that path.  Typically, you can only get in this state through the command line.  In your case, $/Application.DataWarehouse/Test-branch/Dsat.Framework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.HTM happens to have a permission set.

    2. In TFS, you are only allowed to delete/rename paths if you have recursive read permissions underneath the path (that's what the '*' means).  Because deletes and renames are recursive, this is necessary to keep people from messing with items they don't have read permission for.  Because Inherit is No for $/Application.DataWarehouse/Test-branch/Dsat.Framework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.HTM, you don't have read permission.

     

    The fix?  Run tf permission /inherit:yes "$/Application.DataWarehouse/Test-branch/Dsat.Framework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.HTM".  You can also remove the unneeded permission entry for [Application.DataWarehouse]\Contributor with tf permission /remove.

    Wednesday, October 06, 2010 6:17 PM
    Moderator
  • Hi,
    Right click on the file and select properties. Go to Security tab and check whether any access permission denied. You can check this link http://www.deletelongfile.com also. It will help you.
    Friday, November 19, 2010 12:15 AM
  • Hi,http://www.deletelongfile.com

    this link is very helpful in this matter.

    I faced some similar kind of problem and solved it.

    Tuesday, November 23, 2010 6:33 AM