Solved

Is there a way to prevent an Excel file from being deleted?

Posted on 2013-12-05
18
279 Views
Last Modified: 2013-12-30
Is there a way to prevent an Excel file from being deleted?
0
Comment
Question by:Conernesto
18 Comments
 
LVL 19

Expert Comment

by:jss1199
ID: 39699424
Assume it is on a file server or your local machine?

1.  Right-click the file you want to protect (I'm using c:\users\username\documents\myexcel.xlsx) and choose Properties.

2.  On the Security tab, click Advanced.  The 'Advanced Security Settings for Pictures' dialog options.

3.  Click the Change Permissions... button.

4.  Click the Add... button, and type "everyone" (no quotes) into the box, then click OK.  A 'Permission Entry' dialog appears.

5.  Scroll to the bottom.  Place a checkmark in the 'Deny' column for "Delete".  Do not add any other checkmarks.

6. Click OK.

7.  Click OK.

Windows will set the deny delete permission on this file.
Note: Deny permissions take precedence over allow permissions, so no one will be able to delete any file until/unless this permission item is removed.  This will block other apps from being able to delete either.
0
 

Author Comment

by:Conernesto
ID: 39699438
I have about 100 excel spreadsheets inside a folder that I want to protect from being deleted. Do I need to do the above steps for each or is there a faster way?
0
 
LVL 19

Expert Comment

by:jss1199
ID: 39699465
Perform the steps on the parent folder - it will protect all the files within that folder.
0
 
LVL 6

Expert Comment

by:Spyder2010
ID: 39699472
You can set the above mentioned permission on the folder that contains the spreadsheets.  It will inherit down to all the files within the folder
0
 

Author Comment

by:Conernesto
ID: 39699728
I have subfolders in side the folder that has the Excel worksheets. Is there a way to protect the folder contentets without protecting the PDF folders?
0
 
LVL 19

Expert Comment

by:jss1199
ID: 39699740
You would have to set the deny permission at the folder level, and then on each PDF folder remove the Deny permission.

Or rearrange your folders to more easily allow the deny permission to only apply to the folders you wish :)
0
 

Author Comment

by:Conernesto
ID: 39701486
Can an Access Database be protected from being deleted?
0
 

Author Comment

by:Conernesto
ID: 39701560
I went ahead and set the permission on the folder to deny as instructed above. I then went into the folder and tried to delete a file and the file was deleted. Did I do something wrong?
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:Conernesto
ID: 39701627
When I select delete, I get a message Are you sure you want to send this to the recycle bin?
The file is then deleted.
0
 
LVL 19

Expert Comment

by:jss1199
ID: 39701668
Since you are making this change to a folder, there is one additional items you need to check.

1. When adding the delete permission, Select the checkbox that says Replace all child object permissions with inheritable permissions from this object.  See attached screenshot

screenshot of dialog box
0
 

Author Comment

by:Conernesto
ID: 39701910
I can't seem to get both of ther above check boxes to stay. I check both check boxes and click on apply and one of the check boxes gets unchecked.
0
 
LVL 19

Expert Comment

by:jss1199
ID: 39701942
That is fine. It is supposed to unchecked after you apply. Can you test delete?
0
 

Author Comment

by:Conernesto
ID: 39702130
I did the test. I saved an Excel wb and I was able to delete it. I was also able to delete the folder?
0
 
LVL 19

Expert Comment

by:jss1199
ID: 39702135
Deny delete was applied to everyone?
0
 

Author Comment

by:Conernesto
ID: 39702144
Yes.
0
 

Author Comment

by:Conernesto
ID: 39706253
Attached are two files. A-Protect.xlsx is an Excel workbood. I protedted this file but I am still able to deleted. the second attachment is a zip file that contains one folder. I also protected this file but I am able to deleted. Can you please reveiw and let me know what I did wrong?
A-Protect.xlsx
A-Protect.zip
0
 
LVL 12

Accepted Solution

by:
Harry Lee earned 500 total points
ID: 39721919
Conernesto,

you have to test the delete with another login account. Since you are the administrator (who can change the permission of the files), you can always delete the files and folders.

In fact, all login names under the Administrators group can delete the files and folders. If you don't want yourself to be able to delete the files, you will have to lock the file permission to only SYSTEM.

System administrators can almost always delete the files, as long as you know how to.

If you really want nobody, including yourself and all the administrators, to not able to delete the files, you have to give Full Control access, of the files, only to SYSTEM.

To do so, you have to remove delete access of Administrators, Everyone, and Creator Owners. And of course, you have to remove Delete access for all other user class accounts.

One thing to watch out, you can accidentally loose control of the files yourself.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Sparklines have been introduced with Excel 2010 and are a useful tool for creating small in-cell charts, used for example in dashboards. Excel 2010 offers three different types of Sparklines: Line, Column and Win/Loss. What it does not offer is a…
INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now