I'm trying to test new network monitoring code for an application that runs on a Debian appliance. I am currently tasked with ensuring that an SNMP trap is thrown when external network shares (such as S3 buckets) are mounted with FUSE and the connection is broken.
The problem is that to make the share inaccessible, I would apparently have to make files unwritable (or block every possible S3-related IP with iptables) and I cannot block write access if the bucket is meant to be read from and written to by the root user, and is monitored by the root user.
Is there some way to make this program, running as root, think the bucket went down?
P.S. I cannot make these buckets using chattr because, afaik, S3 doesn't support the concept of attributes like immutability.