Why can t I delete pdf files from my desktop

Get answers from your peers along with millions of IT pros who visit Spiceworks.
Join Now

OS: Windows server 2012 R2

I am having issues with deleting/renaming PDF files!

Permissions is not an issue as even logged in as the Network Administrator of the Domain on a workstation (not on the actual server) and I still can't delete the file.

The error message I'm recieving is: cannot delete xxxx.pdf It is being

used by another person or program. Close any programs that might be

using this file and try again.

There are only 1 or 2 users that would have access to the files and

neither of them are using them. I can also reset the security

permissions for the file and take ownership, but even after doing these

things it doesn't make a difference?

I've tried various unlocking tools (Unlocker) and none of them report

that the file is open or that there are any locks on them. This only

happens with PDF files. If I reboot the sever the problem will go away,

but this server needs to be 99.999% of the

time!

Help please!


Best Answer
Why can t I delete pdf files from my desktop
Datil
OP
Sigkill Sep 24, 2014 at 07:22 UTC

On the Share Permissions:

  • Click the "Advanced Sharing" button
  • Click the "Permissions" button

To delete files, your users will need "Change" access at minimum.

On the NTFS Permissions:

  • Users will need "Modify" permissions at minimum to delete files
  • I would not give users "Full Control", which means they can change ownership and permissions on files, which could cause issues with not being able to delete PDF files

    From the screenshots, I cannot see if you have any special groups setup that apply to the users for this share. I also would not suggest using the "Everyone" group as that opens the share wide open to non domain users. The below permissions and steps are what you'll want to get the permissions in check. However, I would recommend using a specific security group that ONLY includes users that need access to the share vs Domain Users.

    SHARE PERMISSIONS:

    • Domain Admins - Full Control
    • Domain Users - Change

    NTFS PERMISSIONS:

    Step 1 - Replace owner on all files/folders in the share and remove inherited permissions

    Log onto the server with the share as a Domain Admin account. Right-Click the share folder and select properties. Click the Security Tab. Click the Advanced button. Click the Owner Tab. Click the Edit button. Select "Administrators" as the owner, select "Replace owners on sub containers and objects", and click OK... This may take a few seconds to minutes depending on how many folders/files are in there. Click the Permissions tab. Click the Change Permissions tab. Uncheck "Include inheritable permissions from this object's parent" (Unless already unchecked), click "OK" and if prompted click "Copy" to keep the existing permissions. Click OK

    Step 2 - Replace NTFS permissions on all files/folders in the share

    Log onto the server with the share as a Domain Admin account. Right-Click the share folder and select properties. Click the Security Tab. Click the Edit button. Set the permissions as follows then click OK:

    • SYSTEM - Full Control
    • Administrators - Full Control
    • Domain Admins - Full Control
    • Domain Users - Modify

    Click the Advanced button. Click the Change Permissions button. Select "Replace all child object permissions with inheritable permissions from this object" and Click OK. Click OK.

    That should square away any permissions problems. Again, I'd still recommend using a security group that ONLY includes the users that need access... otherwise, I'd suggest "Domain Users" vs Everyone.

    • prev
    • 1
    • 2
    • next

    27 Replies

    · · ·
    Why can t I delete pdf files from my desktop
    Chipotle
    OP
    Colin7944
    Why can t I delete pdf files from my desktop
    This person is a verified professional.
    Verify your account to enable IT peers to see that you are a professional.
    Sep 17, 2014 at 08:13 UTC

    Sorry; I'm stuck on 2008 R2 (so bear with me!)... but is there a server manager/open files option on that server; or the relevant file server?

    0
    · · ·
    Why can t I delete pdf files from my desktop
    Datil
    OP
    Sigkill Sep 17, 2014 at 08:24 UTC

    Kill Any Remote PDF's Open

    • Start->Administrative Tools->Share andStorage Management
    • Click on the share with the PDF's
    • Click Manage Open FIles
    • Close any open files

    Alternatively, click "Manage Sessions" and see if anyone has it opened.

    Kill Any Locally Open FIles

    Open Task manager, and see if any PDF programs are running.. Kill those.

    Other Notes

    If you have antivirus or backups running on the share, see if those accounts are accessing them as well

    3
    · · ·
    Why can t I delete pdf files from my desktop
    Sonora
    OP
    CapnAleksey Sep 17, 2014 at 08:37 UTC

    I read somewhere that OpLocks would help me.

    Would they?

    0
    · · ·
    Why can t I delete pdf files from my desktop
    Sonora
    OP
    CapnAleksey Sep 17, 2014 at 08:38 UTC

    There's no such thing as Share andStorage Management

    at least I can't find it.
    0
    · · ·
    Why can t I delete pdf files from my desktop
    Jalapeno
    OP
    Ninja
    Why can t I delete pdf files from my desktop
    This person is a verified professional.
    Verify your account to enable IT peers to see that you are a professional.
    Sep 17, 2014 at 08:43 UTC

    Edit: Sorry mixing up versions, Its in Administrative Tools > Computer Management > Shared Folders > Open Files

    Edited Sep 17, 2014 at 08:56 UTC
    1
    · · ·
    Why can t I delete pdf files from my desktop
    Mace
    OP
    Sosipater
    Why can t I delete pdf files from my desktop
    This person is a verified professional.
    Verify your account to enable IT peers to see that you are a professional.
    Sep 17, 2014 at 08:56 UTC

    Have you verified that your share permissions grants you at least modify?

    1
    · · ·
    Why can t I delete pdf files from my desktop
    Sonora
    OP
    CapnAleksey Sep 17, 2014 at 09:01 UTC

    Yes, I have permissions to modify.

    0
    · · ·
    Why can t I delete pdf files from my desktop
    Sonora
    OP
    CapnAleksey Sep 17, 2014 at 09:06 UTC

    This does work however the problem is that I cannot do this 24-7. I have multiple users, and doing this all over again all the time is dumb.

    0
    · · ·
    Why can t I delete pdf files from my desktop
    Datil
    OP
    Sigkill Sep 17, 2014 at 09:21 UTC

    CapnAleksey wrote:

    There's no such thing as Share andStorage Management

    at least I can't find it.
    Are you doing this directly on the 2008R2 server or using RSAT tools? It should be there by default on the 2008R2 server, but you'll need to install it for RSAT Tools
    0
    · · ·
    Why can t I delete pdf files from my desktop
    Sonora
    OP
    CapnAleksey Sep 17, 2014 at 09:27 UTC

    Sigkill, I can do this directly on Windows Sever 2012 R2, however I think I can kill open files with :Administrative Tools > Computer Management > Shared Folders > Open Files (as stated above)

    but that is not a valid option, since I cannot do this 24/7, and I don't want to give users the admin pass. In addition to that my boss will not be happy, he wants it to be easy as possible, and telling users.. "Hey, since you cannot del the .pdf file, and I'm away, log into our server using remote desktop, here are the credentials, once you've logged in go toAdministrative Tools > Computer Management > Shared Folders > Open Files, find... bla bla" - No, that's not the way out, sorry. But I highly appericiate your help. I was kinda hoping to get some info regarding OpLocks, as I heard enabling them would solve the problem completely.

    0
    · · ·
    Why can t I delete pdf files from my desktop
    Datil
    OP
    Sigkill Sep 17, 2014 at 09:44 UTC

    Yes you can kill open files under Open Files (Same thing as Share and Storage Management). There are 2 other potential options:

    Try this program:

    http://emptyloop.com/unlocker/

    Write a powershell to force close the file then delete it. You can dish your boss the script to run to kill the file he wants deleted pretty easy

    Close-SmbOpenFile -Force


    0
    · · ·
    Why can t I delete pdf files from my desktop
    Sonora
    OP
    CapnAleksey Sep 17, 2014 at 09:55 UTC

    Sigkill, I'm not quite familiar with writing 'powershells', unfortunately.

    0
    · · ·
    Why can t I delete pdf files from my desktop
    Tabasco
    OP
    Tony6900
    Why can t I delete pdf files from my desktop
    This person is a verified professional.
    Verify your account to enable IT peers to see that you are a professional.
    Sep 17, 2014 at 11:57 UTC

    You will get that error message if you try to delete/rename the file through Windows Explorer while the preview pane is open. Turn off the preview pane.

    1
    · · ·
    Why can t I delete pdf files from my desktop
    Sonora
    OP
    CapnAleksey Sep 17, 2014 at 11:58 UTC

    My boss does not want to turn off the Preview pane.

    0
    · · ·
    Why can t I delete pdf files from my desktop
    Tabasco
    OP
    Greg Strickland
    Why can t I delete pdf files from my desktop
    This person is a verified professional.
    Verify your account to enable IT peers to see that you are a professional.
    Sep 17, 2014 at 12:33 UTC

    Actually, this is already easy, because you can a) automate it, and 2) your users generally shouldn't be deleting files off the shares anyway. Now this varies from business to business, but where I've worked, we've never allowed general users delete permissions on a share. Certain users (the section manager, in that section's folder only) would have that ability, but that's it. I've never allowed users to even see the stuff in another section's folder. But seriously, if it's that big of a problem, you can build your script and run it as an hourly task or whatever interval works best for you.

    I believe you can force turn-off the preview plane via GP, but I'm not 100% on that. And if it's part of your problem, then you'll need to do it at least for your own account, so that it isn't getting in your own way when you're trying to resolve a particular file for a user.

    0
    · · ·
    Why can t I delete pdf files from my desktop
    Tabasco
    OP
    Tony6900
    Why can t I delete pdf files from my desktop
    This person is a verified professional.
    Verify your account to enable IT peers to see that you are a professional.
    Sep 17, 2014 at 12:33 UTC

    CapnAleksey wrote:

    My boss does not want to turn off the Preview pane.

    So turn it back on again after the file is deleted/renamed.
    0
    · · ·
    Why can t I delete pdf files from my desktop
    Jalapeno
    OP
    Ninja
    Why can t I delete pdf files from my desktop
    This person is a verified professional.
    Verify your account to enable IT peers to see that you are a professional.
    Sep 18, 2014 at 01:08 UTC

    Try testing with giving Full Control as suggested here:

    http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/Windows_Server_2008/Q_26703706...

    0
    · · ·
    Why can t I delete pdf files from my desktop
    Mace
    OP
    Sosipater
    Why can t I delete pdf files from my desktop
    This person is a verified professional.
    Verify your account to enable IT peers to see that you are a professional.
    Sep 18, 2014 at 03:05 UTC

    CapnAleksey wrote:

    Yes, I have permissions to modify.

    Is that NTFS, Share, or both?
    0
    · · ·
    Why can t I delete pdf files from my desktop
    Sonora
    OP
    CapnAleksey Sep 22, 2014 at 07:01 UTC

    Greg, What are you talking about? My boss created a new .pdf file, he needs to delete the old one but can't.

    Same with other people.

    0
    · · ·
    Why can t I delete pdf files from my desktop
    Datil
    OP
    Sigkill Sep 22, 2014 at 07:17 UTC

    Sosipater wrote:

    CapnAleksey wrote:

    Yes, I have permissions to modify.

    Is that NTFS, Share, or both?
    "Modify" would imply NTFS, on a share permission you have "Full Control", "Change, or "Read" without custom permissions... The share permission of Change is basically the equivalent of NTFS Modify....
    0
    · · ·
    Why can t I delete pdf files from my desktop
    Datil
    OP
    Sigkill Sep 22, 2014 at 07:19 UTC

    @CapnAleskey,

    Are the shares an individuals folder or are they accessed by multiple users? Can you list both the share and NTFS permissions you have set?

    0
    · · ·
    Why can t I delete pdf files from my desktop
    Sonora
    OP
    CapnAleksey Sep 22, 2014 at 10:14 UTC

    Sigkill, How do I check NTFS permissions on a shared folder/file?

    0
    · · ·
    Why can t I delete pdf files from my desktop
    Datil
    OP
    Sigkill Sep 22, 2014 at 18:07 UTC

    To check Share Permissions:

    1. Log onto the server hosting the share
    2. Locate the shared folder, right-click and select properties
    3. Click the Sharing tab

    To check NTFS Permissions:

    1. Log onto the server hosting the share OR connect to the share (ie: \\server)
    2. Located the shared folder, right-click and select properties
    3. Click the Security Tab
    0
    · · ·
    Why can t I delete pdf files from my desktop
    Sonora
    OP
    CapnAleksey Sep 24, 2014 at 06:10 UTC

    Sigkill, to answer your first question:

    Why can t I delete pdf files from my desktop

    And to answer your second question

    Why can t I delete pdf files from my desktop

    0

    This topic has been locked by an administrator and is no longer open for commenting.

    To continue this discussion, please ask a new question.