Prevent public_html Deletion

orkinoks

Verified User
Joined
Dec 24, 2010
Messages
75
Hi,
I am trying to prevent users from deleting their system files according to the kb in http://help.directadmin.com/item.php?id=166
But I don't only want to prevent the deletion of symbolic link for public_html, I want to protect all system folders.

So far, I have tried
if ($path == "/home/*/domains/*/public_ftp")
if ($path == "/home/|USER|/domains/|DOMAIN|/public_ftp") to define the exact file paths but it did not work.

May I learn how to define the variable user and domain directories in this script.
I'll also make a suggestion to guys in Directadmin to update this knowledgebase to include this information as users not only delete symbolic links :)

Regards.
Orkun
 
When you're inside a filemanager, user gets chrooted to /home/user. That means you couldn't use "/home/user/domains/" in your path, as that would result in "/home/user/home/user/domains/" :)
 
Hi Martynas,
thank you for the information, but if I am not missing anything, the user is not jailed to domains/|domain.com| directory. So in this case, we still need to define the name of the domain, it should be something like;

if ($path == "/domains/|DOMAIN|/public_html") But I can't find how to define the domain name in the documentation.
 
Back
Top