Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Developers' Forum

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 15th March 2012, 02:24
versatile versatile is offline
Junior Member
 
Join Date: Mar 2011
Posts: 14
Thanks: 1
Thanked 3 Times in 1 Post
Default problem with remote fonction

Hi,

I use a ispconfig's module to create clients and websites with th API. I have a problem when I would like to create websites, the website is creating but with the wrong owner: the client's default ( client0).

The output of
cat /etc/passwd/

web17:x:10017:10001::/var/www/clients/client0/web17:/bin/false
web19:x:10019:10001::/var/www/clients/client0/web19:/bin/false
web21:x:10021:10001::/var/www/clients/client0/web21:/bin/false


Each user is creating with the group of the client0 10001

cat /etc/group/

sshusers:x:5002:web1,.........web17,web19,web21
.
.
.
.
client19:x:10015

......

web17 and web21 are not in this file

The output of ispconfig.log

14.03.2012-23:57 - DEBUG - Adding the user: web21
14.03.2012-23:57 - DEBUG - Creating symlink: ln -s /var/log/ispconfig/httpd/testtest.net /var/www/clients/client0/web21/log
14.03.2012-23:57 - DEBUG - Creating symlink: ln -s /var/www/clients/client0/web21/ /var/www/testtest.net
14.03.2012-23:57 - DEBUG - Creating symlink: ln -s /var/www/clients/client0/web21/ /var/www/clients/client0/testtest.net
14.03.2012-23:57 - DEBUG - exec: chown -R web21:client0 /var/www/clients/client0/web21/web
14.03.2012-23:57 - DEBUG - exec: chown web21:client0 /var/www/clients/client0/web21/web
14.03.2012-23:57 - DEBUG - exec: chmod 751 /var/www/clients/client0/web21
14.03.2012-23:57 - DEBUG - exec: chmod 751 /var/www/clients/client0/web21/*
14.03.2012-23:57 - DEBUG - exec: chmod 710 /var/www/clients/client0/web21/web
14.03.2012-23:57 - DEBUG - exec: chmod 777 /var/www/clients/client0/web21/tmp
14.03.2012-23:57 - DEBUG - exec: chmod 755 /var/www/clients/client0/web21/log
14.03.2012-23:57 - DEBUG - exec: chown web21:client0 /var/www/clients/client0/web21
14.03.2012-23:57 - DEBUG - exec: chown web21:client0 /var/www/clients/client0/web21/cgi-bin
14.03.2012-23:57 - DEBUG - exec: chown web21:client0 /var/www/clients/client0/web21/log
14.03.2012-23:57 - DEBUG - exec: chown web21:client0 /var/www/clients/client0/web21/ssl
14.03.2012-23:57 - DEBUG - exec: chown web21:client0 /var/www/clients/client0/web21/tmp
14.03.2012-23:57 - DEBUG - exec: chown -R web21:client0 /var/www/clients/client0/web21/web
14.03.2012-23:57 - DEBUG - exec: chown web21:client0 /var/www/clients/client0/web21/log/error.log
14.03.2012-23:57 - DEBUG - Creating fastcgi starter script directory: /var/www/php-fcgi-scripts/web21/
14.03.2012-23:57 - DEBUG - Creating fastcgi starter script: /var/www/php-fcgi-scripts/web21/.php-fcgi-starter
14.03.2012-23:57 - DEBUG - Creating fastcgi starter script: /var/www/php-fcgi-scripts/web21/.php-fcgi-starter
14.03.2012-23:57 - DEBUG - Writing the vhost file: /etc/apache2/sites-available/testtest.net.vhost
14.03.2012-23:57 - DEBUG - Creating symlink: /etc/apache2/sites-enabled/100-testtest.net.vhost->/etc/apache2/sites-available/testtest.net.vhost
14.03.2012-23:57 - DEBUG - Apache status is: 1
14.03.2012-23:57 - DEBUG - Calling function 'restartHttpd' from module 'web_module'.



The problem comes from ispconfig don't add the group of the user in the website's creation.
When I change manually the owner I have this output


15.03.2012-00:12 - DEBUG - Adding the group: client25
15.03.2012-00:12 - DEBUG - Removed symlink: rm -f /var/www/testtest.net
15.03.2012-00:12 - DEBUG - Removed symlink: rm -f /var/www/clients/client0/testtest.net
15.03.2012-00:12 - DEBUG - Renaming existing directory in new docroot location. mv /var/www/clients/client25/web21 /var/www/clients/client25/web21_bak_2012_03_15
15.03.2012-00:12 - DEBUG - Moving site to new document root: mv /var/www/clients/client0/web21 /var/www/clients/client25
15.03.2012-00:12 - DEBUG - Creating symlink: ln -s /var/www/clients/client25/web21/ /var/www/testtest.net
15.03.2012-00:12 - DEBUG - Creating symlink: ln -s /var/www/clients/client25/web21/ /var/www/clients/client25/testtest.net



I use this same module to create domains on ispconfig and it's work well with the right owner only websites are this problem.
Thank you your help
Reply With Quote
Sponsored Links
  #2  
Old 15th March 2012, 09:52
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 36,796
Thanks: 840
Thanked 5,612 Times in 4,423 Posts
Default

There is a problem in your script, it passes client_id 0 to the function that creates the websites which instructs ispconfig to assign the sites to the administartor (client0).
__________________
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
MySQL Error Nolan Installation/Configuration 13 27th November 2014 06:04
postfix problems with smtp linkdeb Server Operation 13 15th March 2014 18:58
remote api problem germinator Developers' Forum 1 13th February 2011 22:27
postfix/cleanup: warning: virtual_alias_maps map lookup problem penkku Server Operation 1 11th February 2011 14:48
sending e-mail using mail() function linuxuser1 HOWTO-Related Questions 38 21st April 2009 13:20


All times are GMT +2. The time now is 23:26.


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