protect the essential account directories

Dear Virtualmin Users/Support,

I would like to know how to protect the essential account directories from being deleted by the users.

Sometimes such directories as “icon”(to be found in public_html) are being deleted when a user reinstalls a script. They just delete all contents.

Is there any setting in Virtualmin to protect these directories? Maybe chown root?

It would all be ok if the whole server would not go down because of that one directory.

Thanks

Do you have an example of where one missing directory caused Apache to go down?

Ever since the logs were moved to /var/log/virtualmin, there shouldn’t be any cases anymore where a missing dir causes trouble like that.

For example, even if a user deletes the entire DocumentRoot, that should only be a warning in Apache, not a fatal error.

-Eric

I still have the logs Folder under DocumentRoot. Do I have an old version then or are those logs not essential?

I do not have a concrete example right now since I removed or disabled the V-Servers that caused the problems, but I will try to “break” apache and report with the results.

Howdy,

Well, you’ll have a logs dir in your home directory.

The question is, are the access_log and error_log in it actual files, or symlinks?

The old way would have actual files, the new way would have symlinks into /var/log/virtualmin/$domainname.

However, even with the old way, there is a way to prevent Apache from erroring out if that directory were to go away – you can enable the writelogs program in System Settings -> Server Templates -> Default -> Apache Website.

-Eric

hardcore.*********.com
Home directory : Sub-directory cgi-bin under home directory does not exist

  • that is what I get as a responce under “Limits and Validation” > “Validate Virtual Servers”

and the Apache was not starting, then I deleted the subserver which was causing the error and somehow when I returned to “System Information” the Virtualmin showed me that Apache is started, even though I did not click again to start it.