Cant create new folder on windows server unc path

A classic issue!

When trying to create a new folder on a Windows Server using a UNC (Universal Naming Convention) path, you may encounter an error message indicating that the operation is not allowed. This is because the default permissions on a Windows Server do not allow creating new folders on a UNC path.

Here are a few possible solutions to resolve this issue:

  1. Run the command prompt as an administrator: Right-click on the Start button and select "Run as administrator". Then, navigate to the UNC path and try creating the new folder.
  2. Use the net use command: You can use the net use command to map the UNC path to a drive letter, and then create the new folder. For example:
    net use z: \\server\share
    mkdir z:\newfolder

    Replace z: with the drive letter you want to use, \\server\share with the UNC path, and newfolder with the name of the new folder you want to create.

  3. Use the icacls command: You can use the icacls command to modify the permissions on the UNC path to allow creating new folders. For example:
    icacls \\server\share /grant:r "Domain Users":F
    mkdir \\server\share\newfolder

    Replace \\server\share with the UNC path, and newfolder with the name of the new folder you want to create. The /grant:r option grants the "Domain Users" group full control (F) on the UNC path.

  4. Modify the permissions on the UNC path: You can modify the permissions on the UNC path using the Windows Explorer or the icacls command. Right-click on the UNC path, select "Properties", and then click on the "Security" tab. Add the user or group that needs to create new folders, and grant them the necessary permissions.
  5. Use a third-party tool: There are several third-party tools available that can help you create new folders on a UNC path, such as Robocopy or TeraCopy.

Remember to always follow best practices for security and permissions when working with UNC paths and Windows Servers.