Question

How to delete a file on Nutanix AFS share?


Good evening,

 

Following problem:

I do have a single folder sitting on one of my shares, and I tried literally everything to get it deleted.

When trying to delete, or move to a different share, I only get the error “An unexpected network error occured”, so, not very helpful on that front.

I was able to change said folders owner (logged into CVM via ssh → logged into FSVM) via afs share.get_authorization_info <share> <folder>

However, this didn't help.

To make a long story short: Is there a way to delete a folder within a share on a FSVM directly?

Thanks in advance!


This topic has been closed for comments

11 replies

Hi,

Try share.delete if the share is empty

 

 

Hi,

Try share.delete if the share is empty

 

 

Hi Vaseem,

Unfortunately the share is not empty, and therefore I can't just delete the whole share just to get rid of this single folder.

Understood, have you tried getting help from Nutanix Support?

Userlevel 5
Badge +6

Hello @TMM_David-Herz 

When using a distributed export or share you can’t just delete the top-level directory because it’s a separate share created internally by Nutanix Files. Because you can’t directly delete a top-level directory, removing it requires additional steps.

There are two options for renaming or deleting distributed share folders:

  1. Find out which FSVM is hosting the folder and rename or delete the folder directly using the FSVM as the UNC path.

  2. Use the Nutanix Files MMC snap-in to manage top-level directories. Any file server administrator can perform the MMC operations; you don’t need to assign privileges manually. Establish a connection to the Files namespace and perform the following SMB share management tasks:

    1. Create, delete, rename, and change permissions for top-level directories.

    2. Change NTFS permissions for shares.

Note: Use the Nutanix Files MMC when you modify NTFS permissions at the root of a distributed share. The Files MMC ensures that permissions are propagated to the top-level directories based on inheritance.

You can modify share-level permissions with the Windows-native Shared Folders MMC. Simply launch the Shared Folders MMC and point it to the name of the Nutanix Files instance under the Another computer option. By default, all SMB shares have share-level ACLs set to Everyone with Full Control.

Note: We recommend leaving share permissions at Full Control and managing access with NTFS permissions.

You can also manage open file locks and user sessions with the Windows Shared Folders MMC.

Click to enlargeShared Folders MMC

Hello @TMM_David-Herz 

When using a distributed export or share you can’t just delete the top-level directory because it’s a separate share created internally by Nutanix Files. Because you can’t directly delete a top-level directory, removing it requires additional steps.

There are two options for renaming or deleting distributed share folders:

  1. Find out which FSVM is hosting the folder and rename or delete the folder directly using the FSVM as the UNC path.

  2. Use the Nutanix Files MMC snap-in to manage top-level directories. Any file server administrator can perform the MMC operations; you don’t need to assign privileges manually. Establish a connection to the Files namespace and perform the following SMB share management tasks:

    1. Create, delete, rename, and change permissions for top-level directories.

    2. Change NTFS permissions for shares.

Note: Use the Nutanix Files MMC when you modify NTFS permissions at the root of a distributed share. The Files MMC ensures that permissions are propagated to the top-level directories based on inheritance.

You can modify share-level permissions with the Windows-native Shared Folders MMC. Simply launch the Shared Folders MMC and point it to the name of the Nutanix Files instance under the Another computer option. By default, all SMB shares have share-level ACLs set to Everyone with Full Control.

Note: We recommend leaving share permissions at Full Control and managing access with NTFS permissions.

You can also manage open file locks and user sessions with the Windows Shared Folders MMC.

Click to enlargeShared Folders MMC

 

Hi Moustafa,

Do you know where I can get the Nutanix File MMC?

I'd like to try deleting the folder this way.

Userlevel 5
Badge +6

Hello @TMM_David-Herz 

In the Nutanix Portal, navigate to Downloads > Third-Party Integrations.
Click Download next to the target MMC Snap-In for Files version.

Guide: https://portal.nutanix.com/page/documents/details?targetId=Files-MMC-Plugin-v3:mmc-mmc-plugin-install-t.html

 

Hi Moustafa,

I've successfully installed the MMC snap-in, however when I try to delete said folder this way it also leads to an error “The specified network name is no longer available”

Very strange indeed

Userlevel 5
Badge +6

Hello @TMM_David-Herz 

I guess there endpoint protection “Windows defender or else” block your action. Try to investigate in that. 

Hello @TMM_David-Herz 

I guess there endpoint protection “Windows defender or else” block your action. Try to investigate in that. 

 

I couldn't find an indication for that. Any other folder on the same share can be deleted, strangely I'm even able to rename the affected folder, just deleting is not possible.

Even on an isolated test system with disabled Windows defender and no other security applications it doesn't work.

Userlevel 5
Badge +6

Try to reboot FSVMs, if didn't work with you, 

Then you need to contact Nutanix Support.

Try to reboot FSVMs, if didn't work with you, 

Then you need to contact Nutanix Support.

 

Already did that, didn't help.

But it makes me feel better because at least I'm not completely stupid haha.

Thanks for your help anyways, I've already contacted the Nutanix Support.
Will update this thread once we find out what the problem was.