System file modifications

tdldp

Verified User
Joined
May 9, 2005
Messages
150
Hi...

Following a server migration from server A (Fedora 3) to server B (Debian4) with same versions of directadmin, i have met several errors in backups on server B.

Most important is :
.Awstats statistics misconfigured.
.Database Access rights lost.
.chmods not correct (from 777 to 755 to respect suphp requirements...)

I wish to do the following modifications, if possible under some sort of scripts, but i do not know where to start... (i'm willing to learn and understand with documented examples, not forcely a premade script)

- Awstats :
On fedora all files were under /etc/awstats (including stats per domain)
I wish to make a script, that will :
1-
parse all awstats.[domain].conf files present in /etc/awstats
check in each file
AllowAccessFromWebToFollowingAuthenticatedUsers="[user]"
and get [user]
check in each file if param :
DirData="/etc/awstats" is present and if yes, then comment out line, and insert :
DirData="/home/[user]/domains/[domains]/stats/"
And save fille
2-
Parse all files in /etc/awstats/backup
Copy each file awstats{date}.[domain].txt and dnscachelastupdate.[domain].txt to /home/[user]/domains/[domains]/stats/
Remove files awstats{date}.[domain].txt and dnscachelastupdate.[domain].txt in /etc/awstats.backup

- Database access rights :
Our clients under Orange ISP are allowed an access on server on a joker % access... (%.orange.fr)
I wish to make an automatic check of all databases to verify if joker is present. If not must be added...

- Chmods :
Since migration, in each /home/[user]/domains/[domains]/public_html
I have a unzip file that was formally under chmod 777 and now must be under 755...
I would like to parse all folders check chmod of file, and replace if necessary by correct chmod...



Another problem :
We have in France regular spamblocking due to lack of quality isp's...
Certain of our clients get therefore their own clients blocked through antispam Rbl rules... I have therefore setup under /etc/virtual/ a file named whitelist_senders_rules that holds list of granted access email adresses...
I wish to implement in a skin a page (already made) where our clients can by themselves add their clients email adress that will be automatically whitelisted on our servers (except for antivirus)
How do i cope system file modifications through the web panel, so that email adresses get added in the file ???

Yours

Tdldp
 
There already should be a file for whitelisting senders; it's at /etc/virtual/whitelist_sendersl, and that's the sanctioned method for whitelisting sender addresses.

You can create a plugin for use at the user level for users to add email addresses to that file. It can also allow users to remove email addresses, but...

Note that it should NOT show the contents of the file, or else users can remove whitelisted addresses entered by other users; this would be a major privacy issue.

Or, alternatively, you can write your own system with a file for every user, and when the user clicks on "enter" in your plugin it could rewrite the system /etc/virtual/whitelist_senders file from all the separate user whitelist files.

Jeff
 
First let me thank jeff, for your appreciated responses you often provide me...

There already should be a file for whitelisting senders; it's at /etc/virtual/whitelist_sendersl, and that's the sanctioned method for whitelisting sender addresses.

I assure you there is a whitelist_senders file,
I've even coped a second internal whitelist senders file, that is our "users" list of email adresses they ask us to whitelist.
This file is then duplicated on our secondary mail server (though there are problems with this server and i'll need to make a clean reinstall of secondary mx... If you have a good tuto on how to set this up, i'm all ears...)

You can create a plugin for use at the user level for users to add email addresses to that file. It can also allow users to remove email addresses, but...

Note that it should NOT show the contents of the file, or else users can remove whitelisted addresses entered by other users; this would be a major privacy issue.

Or, alternatively, you can write your own system with a file for every user, and when the user clicks on "enter" in your plugin it could rewrite the system /etc/virtual/whitelist_senders file from all the separate user whitelist files.
Jeff

What i would like, is that this file gets incremented automatically through the user page available in mail only theme, when one of our clients adds an email adress in the list.

This email adress gets stored in a mysql database for displaying purposes, on a user basis (1 user can't see added emails of other users). I'll see for erasing an email adress even if i haven't planned this before...

I understand i need to setup plugins, but where can i find tuto or example on integrating a plugin inside directadmin ???

Thks once more for your answers...

Any idea for my 2 other problems on statistics ???

Tdldp
 
First let me thank jeff, for your appreciated responses you often provide me...
Thanks :)
If you have a good tuto on how to set this up, i'm all ears...)
I don't; I've never believed in secondary MX servers. If I ever do in the future, I'll post somewhere in these forums.
What i would like, is that this file gets incremented automatically through the user page available in mail only theme, when one of our clients adds an email adress in the list.

This email adress gets stored in a mysql database for displaying purposes, on a user basis (1 user can't see added emails of other users). I'll see for erasing an email adress even if i haven't planned this before...

I understand i need to setup plugins, but where can i find tuto or example on integrating a plugin inside directadmin ???
DirectAdmin has prepared a sample plugin available here. There isn't any other formal documentation, but you can always search these forums for help.
Any idea for my 2 other problems on statistics ???
If I don't answer it's because I don't have a good answer (or sometimes even a bad one :)).

Jeff
 
Back
Top