0

I wrote a Linux (RHEL7) service that regularly polls a bunch of industrial machines for log files. To accomplish that, I've mounted the hard drives of the Win7 control computers of the machines on the Linux system like this (in fstab):

//192.168.x.x/share /tools/x/y  cifs auto,nofail,ro,user,username=x,password=y,vers=2.1

Note the "ro" (readonly) option. Now on one of those machines a file (that my polling service doesn't even look at) has mysteriously been corrupted. My question is, could that have been caused by the CIFS mount? I believe that the "ro" option would block any erroneous write attempt early on in the kernel of the Linux client, long before it could reach the CIFS driver, let alone be propagated to the Windows host.

Is my understanding correct? It's something I need to explain to non-technical people in management.

musbur
  • 193
  • 12

1 Answers1

2

Indeed.

When a client mounts an export read only it shouldn’t send write requests to the file server.
That makes it unlikely that the corruption came from your end. But since that read only status is set on the client and not enforced from the file server providing the export, you cannot completely exclude that a client (not necessarily yours) accessed the share in read-write mode and is the culprit.

Note that also the fact that the file is on an export does not exclude that the corruption occurred on the file server itself either.

Bob
  • 5,805
  • 7
  • 25