From owner-freebsd-hackers Thu Mar 30 16:39:29 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id QAA04379 for hackers-outgoing; Thu, 30 Mar 1995 16:39:29 -0800 Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.97.216]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id QAA04372 for ; Thu, 30 Mar 1995 16:39:28 -0800 Received: (from kargl@localhost) by troutmask.apl.washington.edu (8.6.11/8.6.9) id QAA07349 for freebsd-hackers@freefall.cdrom.com; Thu, 30 Mar 1995 16:39:15 -0800 From: Steven G Kargl Message-Id: <199503310039.QAA07349@troutmask.apl.washington.edu> Subject: symlink mode_t question To: freebsd-hackers@freefall.cdrom.com (FreeBSD) Date: Thu, 30 Mar 1995 16:39:15 -0800 (PST) X-Mailer: ELM [version 2.4 PL24] Content-Type: text Content-Length: 1207 Sender: hackers-owner@FreeBSD.org Precedence: bulk Hackers, I have a simply question about the mode given to a symlink when I use `ls -l'. Why is it alway lrwxrwxr-x, and not resolved to the true access permission of the file? %ls -l *.txt lrwxrwxr-x 1 kargl wheel 5 Mar 30 16:16 a.txt@ -> b.txt --w--w--w- 1 kargl wheel 356 Mar 30 14:11 b.txt %chmod a-r a.txt lrwxrwxr-x 1 kargl wheel 5 Mar 30 16:16 a.txt@ -> b.txt --w--w--w- 1 kargl wheel 356 Mar 30 14:11 b.txt %cat a.txt cat: a.txt: Permission denied I'm adding a symlink option to install(1), and I would like the symlink access permissions to reflect those of the original file. While I'm here. What happens to the setting of immutable/append bits on a file? Does a symlink correctly handle these flags? BTW, I'm adding 2 gzip option, a preserve timestamp option, and I hope better error handling to install(1); e.g., %install -S -z -t file1 file2 Create a symlink file2 to a gzipped file1 and give the last access/modify times of file1 to file2. -- Steven G. Kargl | Phone: 206-685-4677 | Applied Physics Lab | Fax: 206-543-6785 | Univ. of Washington |---------------------| 1013 NE 40th St | FreeBSD 2.1-current | Seattle, WA 98105 |---------------------|