Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > MyDNSConfig > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 6th February 2007, 07:38
thewebbie thewebbie is offline
Junior Member
 
Join Date: Feb 2007
Posts: 7
Thanks: 0
Thanked 3 Times in 2 Posts
Default permission error with mydnsimport

When I import a zone using the following command

mydnsimport --axfr=1.2.3.4 -r domaname.net

I get the following when trying to view the record.
Error:
You don't have the permission to view this record or this record does not exist!

I have dropped the database and reinstalled everything with the same result. Any ideas?
Reply With Quote
The Following User Says Thank You to thewebbie For This Useful Post:
AbannyvabVask (22nd December 2013)
Sponsored Links
  #2  
Old 7th February 2007, 04:38
thewebbie thewebbie is offline
Junior Member
 
Join Date: Feb 2007
Posts: 7
Thanks: 0
Thanked 3 Times in 2 Posts
Default

ok.. I have figured out that I need to manually edit the tables to get the zones viewable. My next question is.

1. How can I automate this while importing 10,000 domains?
2. How can I set permissions when the zone is added by a regular user?
example.. bob is a reseller and has his own login to add domains. I only want bob and the admin user to view his zones.
Reply With Quote
  #3  
Old 7th February 2007, 19:17
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,752 Times in 2,582 Posts
Default

Quote:
Originally Posted by thewebbie
1. How can I automate this while importing 10,000 domains?
You could write a script (e.g. in PHP) for it.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #4  
Old 8th February 2007, 06:04
thewebbie thewebbie is offline
Junior Member
 
Join Date: Feb 2007
Posts: 7
Thanks: 0
Thanked 3 Times in 2 Posts
 
Default

Quote:
Originally Posted by falko
You could write a script (e.g. in PHP) for it.

If anyone interested. (note.. I am not a programmer nor do I play one on TV) It pulls all the zones and adjusts the data so the zones work after import.

Code:
<?php
$dbhost = 'localhost';
$dbuser = '*******';
$dbpass = '*******';

$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die                      ('Error connecting to mysql');

$dbname = 'mydns';
mysql_select_db($dbname);

$query  = "SELECT origin FROM soa";

$result = mysql_query($query) or die('Error, query failed');

while($row = mysql_fetch_array($result, MYSQL_NUM))
{
     $soa = $row[0];
     print "Done with $soa \n"; 
  
    mysql_query("UPDATE soa SET sys_perm_user='riud',sys_perm_group='riud',sys_userid='1',sys_groupid='1' WHERE origin='$soa'") or die(mysql_error());

} 

mysql_close($conn);
?>
This one fixes the rr records
Code:
<?php
$dbhost = 'localhost';
$dbuser = '*******';
$dbpass = '*******';

$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die                      ('Error connecting to mysql');

$dbname = 'mydns';
mysql_select_db($dbname);

$query  = "SELECT id FROM rr";

$result = mysql_query($query) or die('Error, query failed');

while($row = mysql_fetch_array($result, MYSQL_NUM))
{
     $rr = $row[0];
     print "Record ID $rr \n"; 
    mysql_query("UPDATE rr SET sys_perm_user='riud',sys_perm_group='riud',sys_userid='1',sys_groupid='1' WHERE id='$rr'") or die(mysql_error());

} 

mysql_close($conn);
?>
Reply With Quote
The Following 2 Users Say Thank You to thewebbie For This Useful Post:
AbannyvabVask (4th December 2013), dahas (27th March 2007)
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting Default File Permission For FTP & SSH asyadiqin Installation/Configuration 6 8th February 2008 18:08
403 Forbidden (Permission to /) rannia_ptaha Installation/Configuration 9 25th January 2007 19:36
Permission denied when running scripts from php marra87 Server Operation 8 19th November 2006 01:45
Primary & secondary DNS-Server Problems: permission denied Pasco Installation/Configuration 10 21st July 2006 13:46
553 "Permission denied on server" ProFTPD 553 Permission denied on server slow_boy Server Operation 15 9th June 2006 13:36


All times are GMT +2. The time now is 21:58.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.