So I have an windows msi installer that I created by cross compiling from a golang program and installed on a client windows machine. The program sends data out from a folder on the windows machine to a Kinesis stream. The program works fine for all files and folders on the local C:\ drive.
My issue is that when the client is using a mounted NTFS drive ("I://, J://, D://") I get an error message with
level=info msg="Ignoring target I:\\xml with invalid stat: open I:\\xml: The system cannot find the path specified."
No matter the mounted drive (E,F,G, etc) I get the same error message. I've tried this across multiple clients and received the same error.
So just for background- I'm compiling the program using wine to get it to an msi when building. The program is taking on a SYSTEM USER role and I've already checked permissions on the mounted directories (and made them wide open- still no luck). Been banging my head against the wall over this one for a while so the question is: has anyone else had an issue like this?
Don't know how much this will help but here is the specific portion of GO code I'm using:
p, err := filepath.Abs(t.Path)
if err != nil {
Logger.Infof("Ignoring invalid target path: %s, error: %s", t.Path, err)
continue
}
_, err = os.Lstat(t.Path)
if err != nil {
Logger.Infof("Ignoring target %s with invalid stat: %s", t.Path, err)
continue
}
c.targets = append(c.targets, site.WatchTarget{p, t.SrcTag})
I've tried os.Stat, Lstat and even os.Open to no avail. Just about at the end of my tether on this one.
The ideal result would be a suggestion on any changes you could suggest that would allow a system user from a cross compiled go program to see mounted network drives.