Is making /var/log directory read only on debian linux safe

logspermissions

I am installing a really small server which got a 512mb CF cars as HD.
Not only I haven't plenty of space, but I would like to minimize the writes to disk.

I would like to completely clear the /var/log directory and to make it read only (write protected).

Will the system hang if I do so?

Best Answer

Instead of making it read only, I would create /var/log as tempfs. and regularily prune. Of course that only works if you have enough spare RAM available.

You can do the same for other possible non-essential directories like /var/tmp

Entries in my /etc/fstab (now commented out):

tmpfs   /var/tmp   tmpfs   defaults,noatime,mode=1777,size=128M   0  0
tmpfs   /var/log   tmpfs   defaults,noatime,mode=0755,size=128M   0  0
Related Question