Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Jan 1999 11:17:20 -0500
From:      Chris Johnson <cjohnson@palomine.net>
To:        Jerry Raynor <jerryr@ComCAT.COM>, freebsd-questions@FreeBSD.ORG
Subject:   Re: . files
Message-ID:  <19990104111720.A16051@palomine.net>
In-Reply-To: <Pine.GSO.4.02A.9901041037350.16056-100000@uw>; from Jerry Raynor on Mon, Jan 04, 1999 at 10:42:46AM -0500
References:  <Pine.GSO.4.02A.9901041037350.16056-100000@uw>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jan 04, 1999 at 10:42:46AM -0500, Jerry Raynor wrote:
> I saw someone asking about hidden files and was wondering is the a way to
> prevent end user from seeing hidden files? 
> 
> I have a . file that I need/use in users directories and some users
> have deleted it.  The file owner is root but obviously the user has rights
> to the directory so its allowing them to remove it.

I don't think you can prevent them from seeing it, but you can prevent them
from deleting it. If "somefile" is the file in question, do this as root:

# chflags sunlnk somefile

The user can own the file and the directory it's in, but he won't be able to
delete the file. Root won't even be able to delete it unless he changes the
flag back. man chflags for more details.

Chris

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990104111720.A16051>