From: "Oleg O. Ossovitskii" Subject: Re[2]: Misc C question Date: Thu, 20 Jun 2002 11:51:58 +0300 Sender: linux-c-programming-owner@vger.kernel.org Message-ID: <4512499703.20020620115158@kgpa.ru> References: Reply-To: "Oleg O. Ossovitskii" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Id: Content-Type: text/plain; charset="us-ascii" To: linux-c-programming@vger.kernel.org Cc: Mohammed Khalid Ansari Hello Mohammed, Thursday, June 20, 2002, 11:05:58 AM, you wrote: MKA> The simple C function is MKA> int access(const char *pathname, int mode); MKA> to suit you needs. Read man pages to find out more. access() isn't so useful as stat() because access() use real user ID and real group ID, instead of EUID and EGID. But You are right - for checking for existense of file access() function is simpler than stat() or lstat(). Best regards, Oleg O. Ossovitskii programming engineer, KGPA Ltd. tel: +7(0112)46-23-40, fax: +7(0112)43-64-96 mailto:oleg@kgpa.ru, icq# 33366588