From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10952f,8bebd5e0e8e16277 X-Google-Attributes: gid10952f,public X-Google-Thread: f72b0,8bebd5e0e8e16277 X-Google-Attributes: gidf72b0,public X-Google-Thread: f678f,8bebd5e0e8e16277 X-Google-Attributes: gidf678f,public From: eedmit@eed.ericsson.se (Michael Tosch) Subject: Re: Performing hard links to directories Date: 1999/02/24 Message-ID: <7b1qcr$h1o2@aken.eed.ericsson.se>#1/1 X-Deja-AN: 448036386 References: <36d438f7.12866181@news.unilim.fr> Organization: Ericsson Eurolab Deutschland GmbH Reply-To: eedmit@eed.ericsson.se Newsgroups: comp.unix.misc,comp.unix.osf.misc,comp.security.unix In article <36d438f7.12866181@news.unilim.fr>, olivierrobert@minitel.net (Olivier ROBERT) writes: > Is it possible to create a hard link to a directory? > I need this because I want to grant access to a user in a directory > which belongs to another user in the same group, but I don't want > everyone in the group to be able to access to that directory. > Performing a hard link to that directory in the first user's home > directory would be a solution...if possible. Can anyone help me? > Thanks! > > O.R. No, hard links work only with files. Soft links work, and the effective result is much comparible. Neither a hard nor a soft link would fulfill your requirement, though. (Hard-linked files share one inode that holds the permission and ownership, if you change permission on one link, the other link(s) would change, too.) A possible approach is: create another group, make both users members of the group, and do (or have them do) something with newgrp. Another approach is: give both users the same UID/GID in passwd. The drawback is, the user that is FIRST in passwd will always appear as owner, and some applications (e.g. screenlock) might be confused. -- /// \\\ ( ..) (.. ) ------------o00-(_)-00o--------o00-(_)-00o------------------------------- Michael Tosch Ericsson Eurolab Deutschland GmbH Data Services EED/I 52134 Herzogenrath Kohlscheid Senior Local System Administrator Germany