Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!nntp.coast.net!dispatch.news.demon.net!demon!jraynard.demon.co.uk!not-for-mail From: james@jraynard.demon.co.uk (James Raynard) Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: changind file permissions for a symbolic link Date: 9 Jul 1996 17:42:37 -0000 Organization: A FreeBSD Box Lines: 38 Message-ID: <4ru5md$1kq@jraynard.demon.co.uk> References: <01bb6d2a.1c8123e0$38673fcb@simonh.addease.com.au> <31E1DF64.41C67EA6@eramp.net> NNTP-Posting-Host: localhost X-NNTP-Posting-Host: jraynard.demon.co.uk In article <31E1DF64.41C67EA6@eramp.net>, Syntax <syntax@eramp.net> wrote: >Simon Harris wrote: >> >> My /tmp directory is a symbolic link to /usr/tmp however when a user other >> than those (read me) in the wheel group try to read mail for example, they >> get >> /tmp/xxxxxxx permission denied. The file permissions on /usr/tmp allow >> anyone to do anything (probably not good) but even this doesn't work. when >> i try to set permissions for the symbolic link, nothing happens. Anyone? 'chmod 1777 /usr/tmp'. >If I understand symbolic links correctly they take on the mode of the >original file when they are created and can not be changed after that. As far as I can tell (after a quick bit of experimenting) the mode on a symbolic link is the same as that on the directory containing it. Anyway, it's irrelevant, as the mode on the link is ignored - the mode on the file it points to is the only one taken into account in determining access. >Therefor, in order to set your /tmp link you will need to remove the >link and recreate it after setting the correct permissions on /usr/tmp. No point, just change the permissions on /usr/tmp directly! >I have my /tmp set at lrwxr-xr-x and /usr/tmp set at drwxrwxrwx and >my mail seems to work fine. It's probably a good idea to set the "sticky bit" on /usr/tmp, to stop users deleting files that don't belong to them - the command I gave above will do this (the permissions will then be drwxrwxrwxt). -- James Raynard, Edinburgh, Scotland james@jraynard.demon.co.uk http://www.freebsd.org/~jraynard/