- ROM
- CPU
- RAM
- GPU
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!
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.
- 1
- 2
27 Replies
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?
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
I read somewhere that OpLocks would help me.
Would they?
There's no such thing as Share andStorage Management
Edit: Sorry mixing up versions, Its in Administrative Tools > Computer Management > Shared Folders > Open Files
Have you verified that your share permissions grants you at least modify?
Yes, I have permissions to modify.
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.
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 ToolsCapnAleksey wrote:
There's no such thing as Share andStorage Management
at least I can't find it.
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.
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:
//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
Sigkill, I'm not quite familiar with writing 'powershells', unfortunately.
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.
My boss does not want to turn off the Preview pane.
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.
So turn it back on again after the file is deleted/renamed.CapnAleksey wrote:
My boss does not want to turn off the Preview pane.
Try testing with giving Full Control as suggested here:
//www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/Windows_Server_2008/Q_26703706...
Is that NTFS, Share, or both?CapnAleksey wrote:
Yes, I have permissions to modify.
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.
"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....Sosipater wrote:
Is that NTFS, Share, or both?CapnAleksey wrote:
Yes, I have permissions to modify.
@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?
Sigkill, How do I check NTFS permissions on a shared folder/file?
To check Share Permissions:
- Log onto the server hosting the share
- Locate the shared folder, right-click and select properties
- Click the Sharing tab
To check NTFS Permissions:
- Log onto the server hosting the share OR connect to the share [ie: \\server]
- Located the shared folder, right-click and select properties
- Click the Security Tab
Sigkill, to answer your first question:
And to answer your second question
- 1
- 2
This topic has been locked by an administrator and is no longer open for commenting.
To continue this discussion, please ask a new question.