Our backup system duplicity
does not support Linux hard links. To prevent data loss, I want to enforce that no hard links exist on our systems. AFAIK, there is no ext4 mount option to disable hard link functionality.
I could remove the ln
utility but this would not disable the underlying system call (and besides, I want to keep symlinks).
Anyone got a good idea how to solve this? Recompile the kernel with EXT4_LINK_MAX set to 1?
The first solution that comes to mind for me is creating aliases for all users so that ln = ln -s.
You can do this by creating a script in /etc/profile.d:
Then insert your alias:
Close and reopen your terminals or execute
exec bash
(assumes you're using bash)This should prevent anyone from executing hardlinks instead of symbolic.