Directory should not be deleted, But the contents can be

Hi Guys,

I have an user's home directory set to /home/A
And A contains the following directories B & C

Is there some way in solaris by which i can prevent the directories B and C from getting deleted by the user but the contents of the directories B & C can be deleted ?

Also i have exported this home directory to Windows via Samba, from where at present, any user with the id and password can modify the folders as well.. Need to prevent this too..

Any help on this matter appreciated

You can only control these by ownerships and permissions

Look at setting the directories sticky bit. Sticky bit will only allow root or the creator/owner to delete the file. This is often done on /tmp to stop users deleting stuff that they haven't created.