[Lazarus] Cannot save file to NFS mounted path
Leonardo M. Ramé
l.rame at griensu.com
Thu Aug 4 12:59:14 CEST 2016
Hi, I'm using TFileStream to save files. It works without issues when
writing to my filesystem, but hangs (does not return) when the path is a
mounted NFS one.
I must add the user has write permissions on the mounted path, in fact
before posting this I've tried creating a text file without using
TFileStream and it worked without an issue, so I assume the problem is
with TFileStream:
// This works:
AssignFile(f, '/mnt/data_vultr/documents/test.txt');
{$I-}
Rewrite(f);
{$I+}
if IOResult =0 then
begin
System.WriteLn(f, 'aaaa');
System.WriteLn(f, 'bbb');
end;
System.Close(f);
// this doesn't work
lFileStream := TFileStream.Create(lFile, fmCreate);
AMemStream.Position := 0;
lFileStream.CopyFrom(AMemStream,AMemStream.Size);
The program is a CGI running on Ubuntu Server 14.04 x64.
Lazarus 1.7 compiled from trunk on 2016-05-13 (SVN 52282M)
FPC 3.1.1
Regards,
--
Leonardo M. Ramé
Medical IT - Griensu S.A.
Av. Colón 636 - Piso 8 Of. A
X5000EPT -- Córdoba
Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979 int. 19
Cel.: +54 9 (011) 40871877
More information about the Lazarus
mailing list