I want to protect my /tmp directory to prevent the files inside from getting deleted, however "chmod +t /tmp" does not set the sticky bit. Is there alternative way to it on mac os x?
Not with /tmp directory, as it is designed to be wiped upon reboot. Doing this can and will cause problems.
By default, files that aren't accessed in three days are deleted from /tmp
More info: https://superuser.com/questions/187071/in-mac-os-x-how-often-is-tmp-deleted
What you are trying to accomplish is NOT a good idea. Please chose a different folder.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With