Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 43256 invoked from network); 12 Jan 2004 11:46:26 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 12 Jan 2004 11:46:26 -0000 Received: (qmail 76024 invoked by uid 500); 12 Jan 2004 11:46:13 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 76004 invoked by uid 500); 12 Jan 2004 11:46:13 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 75991 invoked from network); 12 Jan 2004 11:46:12 -0000 Received: from unknown (HELO everyday.com) (212.107.32.134) by daedalus.apache.org with SMTP; 12 Jan 2004 11:46:12 -0000 Received: (qmail 9008 invoked from network); 12 Jan 2004 11:46:08 -0000 Received: from ppp37106.tele2.ee (HELO andrus) (212.107.37.106) by mail-fe82.tele2.ee with SMTP; 12 Jan 2004 11:46:08 -0000 Message-ID: <01c801c3d901$069aaa60$0100b3a8@andrus> From: "Andrus" To: References: <1073883521.17774.ezmlm@httpd.apache.org> Date: Mon, 12 Jan 2004 13:23:16 +0200 Organization: Eetasoft MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Subject: [users@httpd] Re: How to create file which can be deleted by other X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N >You are making incorrect assumptions about how file permissions work. >Setting mode 0777 (or 0666) on a file will allow any user to modify a >file, but deleting a file is not modification. The ability to delete >depends solely on the permissions of the parent directory. >The solution to your problem is to create a directory under /tmp, give >the directory mode 0777, and create your files there with at least mode >0666. >You can have a file, owned by root, with mode 0000 in a directory and >any user will be able to delete the file as long as said user has write >permissions to the directory. >I suppose there is an exception to this rule... /tmp usually has the >sticky bit set which means that even with mode 1777 only the user (or >root) that creates a file can modify/delete it. I suppose running the >chmod command on the file as root overrides the stickiness (this might >even be a bug in the filesystem code). Aaron, thank for you excellent explanation. I think that best solution is to run my cgi script in the same account as my server program. Is it possible to configure Apache 1/Debian to run my cgi script under ordinary user account using suexec? If not, can I switch to other user account in C code ? Or is making a subdirectory under /tmp or using /var/lib/myappl directory better ? Currently I changed httpd.conf lines to User andrus Group andrus Is this good idea ? --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org