Home > How To > Prevent Accidental Deletion Of File (permissions)

Prevent Accidental Deletion Of File (permissions)

Contents

More specific description. asked 4 years ago viewed 4889 times active 2 months ago Blog Stack Overflow Podcast #98 - Scott Hanselman Is Better Than Us at Everything Benefits for Developers from San Francisco Have orchestras included any modern instrument lately? In other words this doesn't seem to help much... –Svish Feb 27 '10 at 11:22 Unsetting it for the folder seems to be more helpful though... his comment is here

This site is not affiliated with Linus Torvalds or The Open Group in any way. So if you place it in a directory you don't have write access to: mkdir important-files echo test > important-files/myfile chmod a-w important-files # make the directory not writable Then you share|improve this answer answered Sep 5 '11 at 0:47 Stéphane Gimenez 15k14068 I dislike too, but users are newbies to the Linux world. However, when I try to delete it using the Finder, the file is just deleted.

How To Prevent A Folder From Being Deleted In Windows 7

Not the answer you're looking for? When I set the permissions as instructed above it still let's me delete the folders. –Radical924 Jan 28 '15 at 20:28 I need to see a screenshot of your or able to delete the parent folder. files permissions rm share|improve this question edited Aug 4 '16 at 22:37 Gilles 390k777211171 asked Aug 4 '16 at 13:18 Angus 132 what'd be the difference between "editing it"

  • For example: A |-B | + a.html | + b.html | + c.html +-C + a.doc + b.doc The ability to delete "a.html" is controlled by "B" (or inherited from "A").
  • ctrl-click or secondary mouse button on the file -> "Get Info" -> check the "locked" checkbox.
  • asked 2 years ago viewed 78193 times active 1 year ago Blog Stack Overflow Podcast #98 - Scott Hanselman Is Better Than Us at Everything Benefits for Developers from San Francisco
  • This is unexpected - I thought the user's permissions on the child objects would have been inherited from the root of the share (something it continues to do for other users).
  • Pause notications in OSX whilst in a meeting Why can't we remove the sqrt from rms?
  • more hot questions question feed about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Technology Life / Arts Culture / Recreation Science

chattr +i file.desktop see man chattr for more information. Is there an RGB equivalent for smells? MainFolder/SubFolder MainFolder/Another I don't want "MainFolder" to be accidentally deleted, but I'm happy for "SubFolder" and "Another" to be removed! How To Restrict Users From Deleting Files And Folders Uso di "notare" + infinito Job asking for bank email and password Keeping it simple for new players Why is generating 8 random bits uniform on (0, 255)?

However, write protecting the directory might be already what the OP want. –hek2mgl Jun 26 '14 at 4:21 1 @hek2mgl: chattr has a bunch of options, include -a for 'append Chmod Prevent Delete What are Filson hats? share|improve this answer answered Dec 6 '12 at 16:28 Frantique 5,6141739 3 Note that this only works on Ext2/3/4 file systems. (source) –gertvdijk Dec 6 '12 at 16:33 3 Sometimes assigning the ownership of a folder (but not its contents) to a separate user is easier and more obvious.

Why is the second derivative of this function a straight line? Prevent Users From Deleting Files On Network Share solved how to delete hard disk image file in windows 8 More resources Tom's Hardware Around the World Tom's Hardware Around the World Denmark Norway Finland Russia France Turkey Germany UK more hot questions question feed about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Technology Life / Arts Culture / Recreation Science solved Accidentally deleted ntuser.dat file using unlocker from my pc how do i recover from that?

Chmod Prevent Delete

With chattr or by this way. You need to add two sets of permissions - one for "This folder only" and one for "Subfolders and files" –Graham Wager Feb 23 '14 at 7:40 1 @Austin''Danger''Powers I'm How To Prevent A Folder From Being Deleted In Windows 7 Change permission for Others to read only. How To Prevent A Folder From Being Deleted In Windows 10 He can delete.

If you're able to answer this question, please do! http://relite.org/how-to/recover-tmp-file.php I want to be able to continue editing a file in my home directory, but set a permission so I don't accidentally delete it. Unix & Linux Stack Exchange works best with JavaScript enabled current community blog chat Super User Meta Super User your communities Sign up or log in to customize your list. This is not very good while administering or doing some maintenance on the disk if you try to move whole directories as root and you have a lot of +i files Prevent Users From Deleting Files In Shared Folders

How to specify a precondition (LSP) in an interface in C#? My experimentation with various different NTFS permission combinations has been unsuccessful, as I find that the users are either unable to access the contents... For the link, you can either use a symlink or a hard link. weblink Please try the request again.

Anyways a lot of security files like in .ssh directory or gnome configuration directories will have problems with the owner being root and not the user. –laurent Dec 6 '12 at Prevent Folder From Being Moved Or Deleted Primes with prime bit-counts How to stop .bashrc from running sub-command in alias at startup? What's wrong if "Deletion log file could not be created: No authorization"?

Not the answer you're looking for?

I still can delete the Directory as a root. Elegant solution, but one limitation. Why Eurus was sent back to Sherrinford? Ntfs Permissions Modify But Not Delete There's also an lsattr command.

Why don't we use weights to store energy? Can you please suggest me how to prevent deletion of the file but give write permission. Neutralize data Confusion about the use of the present simple in a story Was Dolores Umbridge steered by the Imperius Charm in book 7? check over here asked 6 years ago viewed 5153 times active 1 year ago Blog Stack Overflow Podcast #98 - Scott Hanselman Is Better Than Us at Everything Benefits for Developers from San Francisco

Pause notications in OSX whilst in a meeting Why can't we remove the sqrt from rms? share|improve this answer edited Mar 23 '10 at 11:02 answered Mar 23 '10 at 10:49 Shawn Chin 1,044711 I think I'm going to be lucky with my directory structure linux shell share|improve this question edited Jun 26 '14 at 4:19 Jonathan Leffler 455k63526843 asked Jun 26 '14 at 4:12 Sushma 49110 1 I'm not sure this is really a Wasn't sure which answer to accept.

Your Internet security settings prevented one or more files from being opened solved Using Win8.1 Get the message when trying to delete a *.mkv file "action can't be completed" How to Not sure this is what you want. –laurent Dec 6 '12 at 15:52 add a comment| up vote 1 down vote Change read-write permission of your own files in your /home Is mapping via msg.sender as secure as calling a function only by the owner? In classic Unix-like systems, if you mean "cannot remove the file name from the directory", then make sure the directory is not writable.

How to add a deep chasm -type hazard to an encounter without save-or-die? share|improve this answer edited Feb 24 '14 at 0:43 answered Feb 24 '14 at 0:17 Austin ''Danger'' Powers 4,52392750 Huh... share|improve this answer answered Sep 2 '10 at 9:14 Svish 10.4k4798155 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign permissions files share|improve this question edited Oct 29 '16 at 22:53 unor 370218 asked Dec 6 '12 at 15:16 Anderson Green 76541130 add a comment| 4 Answers 4 active oldest votes

The current permissions are -rw-rw-r--. How can I avoid being "the negative one" when giving feedback on statistics?