[Lazarus] DeleteFile
Agustìn Gregorieu
agustin.gregorieu at outlook.com
Wed Nov 1 15:03:08 CET 2017
Thank you for your answer! I've already solved it, using the GetLastOSError I got a "permission denied" message, so after I change some group permissions on the folder I manage to delete correctly the files.
On Tue, 31 Oct 2017, Agustìn Gregorieu via Lazarus wrote:
Hi! I have a CGI program that must delete files from a server and it's
owned by www-data which allows me to read a file but not to delete it,
even though the file has permissions 777. The folder containing the files
I want to delete has permissions "drwxrwxrwx" and it's owned by
"root:root" and it's files has the same characteristics.
You should check the return value of GetLastOSError.
If that does not tell you anything, try stracing your program.
For a cgi program, what I usually do is create a shell script
which I place instead of the actual binary:
#!/bin/sh
exec strace -o /tmp/cgi.log /path/to/real/cgi/program.bin
Michael.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20171101/72368f89/attachment.html>
More information about the Lazarus
mailing list