Required Directories

Andrew Pantyukhin infofarmer at FreeBSD.org
Mon May 26 16:54:09 UTC 2008


On Mon, May 26, 2008 at 09:03:29AM -0700, Chuck Swiger wrote:
> On May 26, 2008, at 7:30 AM, Grant Peel wrote:
>> I have several servers that the users home directories contain directories 
>> that must exists in order for apache and mail to work correctly.
>> [ ... ]
>> Is there a way (by using either proftpd, or setting sticky bit, or setting 
>> the uimmutable flag), that I can prevent the users from deleting these 
>> directories, and still retain the ability for my (root run) scripts to 
>> have the ability to delete them?

In the hosting environment I manage, I use UFS flags extensively.
Checkout chflags(1) manpage, schg and sunlnk flags in particular.

> It's generally not expected that users would not own the stuff
> under their homedir, or would not be able to delete their files
> if they want to, even if doing so would break something.
> Normally, sysadmins code their scripts to re-create any missing
> directory hierarchy if needed, so that if a user manages to
> shoot themselves in the foot, the cron jobs will be able to
> provide first aid.

I don't know what kind of sysadmins you're talking about, but,
say, if a hoster did not support files with non-ascii names, but
let me upload them and then just remove them automatically, I
would not be happy. Preventive policies work better for me.


More information about the freebsd-questions mailing list