<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>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.
<br>
</p>
<blockquote type="cite" cite="mid:alpine.DEB.2.20.1711011017440.25581@home.telenet.be">
<br>
On Tue, 31 Oct 2017, Agustìn Gregorieu via Lazarus wrote: <br>
<br>
<blockquote type="cite">Hi!  I have a CGI program that must delete files from a server and it's
<br>
owned by www-data which allows me to read a file but not to delete it, <br>
even though the file has permissions 777.  The folder containing the files <br>
I want to delete has permissions "drwxrwxrwx" and it's owned by <br>
"root:root" and it's files has the same characteristics. <br>
</blockquote>
<br>
You should check the return value of GetLastOSError. <br>
If that does not tell you anything, try stracing your program. <br>
For a cgi program, what I usually do is create a shell script <br>
which I place instead of the actual binary: <br>
<br>
#!/bin/sh <br>
exec strace -o /tmp/cgi.log /path/to/real/cgi/program.bin <br>
<br>
Michael.<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset> <br>
</blockquote>
<br>
</body>
</html>