How do I prevent files from being deleted from others?

I have a Mac computer which is used in public, but I am trying to secure a file to prevent others from deleting it. And, if possible, I don't want anyone to open the files. I've looked online for solutions; I've looked on the one that you're supposed to put a password on it with a .dmg file using Disk Utility. I do not want to create a .dmg file, I want the folder itself to be locked as it is used by other applications. How can I do that?

Posted on Jan 12, 2016 11:33 AM

Reply
2 replies

Jan 12, 2016 11:38 AM in response to Gamered1337

Hi, one useful recommendation is to make all this files invisible, for this you will need to use terminal.

Here are the instructions:

Launch Terminal from /Applications/Utilities/ and use the following command syntax:

chflags nohidden /path/to/hide/file.txt

If you know the path to the file just type it yourself. If you don’t, follow the drag & drop methodto automatically type the entire path within the Terminal, just be sure to drop it in after the initial command, and then hit the return key:

chflags hidden [DRAG FILE HERE]

This will hide your folders or files.

For showing those files do:

At any point you can unhide the file with the following chflags command:

chflags nohidden /path/to/hide/file.txt

This means that after you stop using the computer enter those commands on terminal and hide them. The user after you won't be able to see them (unless he knows how to unhide files, but for that case he would have to be specifically looking for your files). And when you return just type the command to unhide them.

If there are many files try to gather them all on a folder and hiding that folder, which automatically will hide all its content

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How do I prevent files from being deleted from others?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.