Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent files in /tmp directory from being removed (Mac OS X)

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?

like image 493
user3344382 Avatar asked Jan 22 '26 12:01

user3344382


1 Answers

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.

like image 189
phoops Avatar answered Jan 25 '26 07:01

phoops



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!