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

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 8th March 2012, 10:48
jesucarr jesucarr is offline
Junior Member
 
Join Date: Feb 2012
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default Remote permission bug?

I'm getting this error when trying to execute domains_get_all_by_user:

Uncaught SoapFault exception: [permission_denied] You do not have the permissions to access this function.

My ISPconfig is 3.0.4.3, the remote user has all the permissions checked in the admin area, and all the other functions work perfectly.

I'm running out of ideas, am I missing something? is it possible that it is a bug?
Reply With Quote
Sponsored Links
  #2  
Old 8th March 2012, 12:40
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,058
Thanks: 826
Thanked 5,392 Times in 4,237 Posts
Default

I've checked that in SVN stable and all permissions are listed there. Check the file /usr/local/ispconfig/interface/web/domain/lib/remote.conf.php, the function domains_get_all_by_user should be listed there. If not, add it. Afterwards edit the remote_user and add the domain permissions again.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 8th March 2012, 13:14
jesucarr jesucarr is offline
Junior Member
 
Join Date: Feb 2012
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, the function is listed there, then I went to the remote user and uncheck/save/check/save all the permissions, in case it needed some kind of refresh. Still same error. I guess the user (who I want the domains list) doesn't need any special permissions...
Reply With Quote
  #4  
Old 8th March 2012, 14:27
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,058
Thanks: 826
Thanked 5,392 Times in 4,237 Posts
Default

Check the remote_user recordin the mysql database of the user that you use to connect to the server to see if it contains "domains_get_all_by_user" in the remote functions field.

Another possibility is that you have not been logged into the remote system before you executed the function or that you passed a wrong session id.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 8th March 2012, 15:09
jesucarr jesucarr is offline
Junior Member
 
Join Date: Feb 2012
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Bingo! that was the bug. That function was missing in the database, I added it, and now it has permissions. However, the result is an empty array, no matter what user id I use. Any ideas where is the problem?
Reply With Quote
  #6  
Old 8th March 2012, 17:14
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,058
Thanks: 826
Thanked 5,392 Times in 4,237 Posts
Default

The function requires a numerical groupid as parameter (see description in remote api docs) and not a username or userid.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #7  
Old 8th March 2012, 17:49
jesucarr jesucarr is offline
Junior Member
 
Join Date: Feb 2012
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think I'm using the correct group id, but digging a bit deeper, I realised that the "domain" table is empty, and apparently domains_get_all_by_user queries that table, right? do I have a misconfiguration somewhere?
Reply With Quote
  #8  
Old 8th March 2012, 18:38
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,058
Thanks: 826
Thanked 5,392 Times in 4,237 Posts
Default

The function you use lists the domains of the domain module and not the websites. I guess you mixed these two functions up. This would also explain why you did not had the permission for this function as the permission is only available after you enabled the domain module under system > interface config and enabling the domain module for the admin user under system > cp users (relogin after you did that).

To get all websites by sysstem group (e.g. group 1), you use this function:

Code:
sites_web_domain_get($session_id, array('sys_groupid' => 1))
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #9  
Old 8th March 2012, 19:51
jesucarr jesucarr is offline
Junior Member
 
Join Date: Feb 2012
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

riiiight! that was it! working now. Thanks a lot for your help.

Now, I'm puting the sys_groupid manually, is there a way to get it using the client id?
Reply With Quote
  #10  
Old 8th March 2012, 21:54
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,058
Thanks: 826
Thanked 5,392 Times in 4,237 Posts
 
Default

The groupid is connected to the client_id directly, every client ahs its own group. You can see this e.g. in sys_group table. But we will add the client_id as selector for api functions soon.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
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
Postfix doesn't have Nolan Installation/Configuration 5 13th April 2011 05:00
SugarCRM Install on ISPConfig3 w/ SuPHP clucena Installation/Configuration 1 9th February 2010 09:29
ISP Config hesitation when opening web pages frankb Installation/Configuration 7 15th December 2008 13:06
Apache Ownership cybereatl General 2 26th March 2008 12:25
Verify email setup meekish Installation/Configuration 28 27th October 2006 15:36


All times are GMT +2. The time now is 12:35.


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