• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Subdomain creation problem

Michele.mc2

New Pleskian
[SOLVED] Subdomain creation problem

Hello everyone!

After upgrading from version 10.0.9 to 11.5.30, I have a problem when I create a new subdomain.

Everything seems to work as it should, except that the directory of the subdomain is not created. :(

I checked the conf file in /var/www/vhosts/system/<subdomain.domain.tld>/ and everything seems fine: I can find the line root "/var/www/vhosts/<domain.tld>/<subdomain>"; pointing to the correct directory ... but the directory does not exist! :confused:

No directory and, of course, no sample files in it.

I'm not sure it is correlated, but during the upgrade to 5.11.30 I faced a similar problem (some directories were not created in /var/www/vhosts/system/..., leading to a problem in saving the conf file). In that case I had to manually create the missing directories and, with Parallels assistance, the missing conf files, logs files, etc. I report in case it can be a clue that helps to find a solution.

Thank you in advance to anyone who can give me a hint to solve the problem!

Michele
 
Last edited:
Thank you for your reply Abdi!

If you mean using the command /usr/local/psa/admin/bin/httpdmng --reconfigure-all... yes, but without success.

It seems to me that Plesk Panel "user" has no wright privileges for the domain root directory (/var/www/vhosts/<domain>/). Can it be?
 
Do you have anything related to the possible cause in the plesk logs?

tail -f /var/log/sw-cp-server/error_log
tail -f /usr/local/psa/admin/logs/panel.log
 
In /var/log/sw-cp-server/error_log can not seem to find anything related, but I found the following lines in /usr/local/psa/admin/logs/panel.log :

(mcdue.net is the domain; test is the subdomain)

Code:
2013-08-08T11:51:01+02:00 ERR (3)  [util_exec]: proc_close() failed
[08-Aug-2013 11:51:01 Europe/Berlin] PleskUtilException: '/usr/local/psa/admin/bin/filemng' 'mcdue' 'list' 'dirs' '/var/www/vhosts/mcdue.net/test' '--in-blocks' failed with code 1.

stdout:
filemng: stat failed: No such file or directory

System error 2: No such file or directory


stderr:
filemng: stat failed: No such file or directory

System error 2: No such file or directory

file: /usr/local/psa/admin/plib/Service/Agent/Transport/Local/Exec.php
line: 38
code: 0
trace: #0 /usr/local/psa/admin/plib/Service/Agent/Transport/Local.php(60): Service_Agent_Transport_Local_Exec->process(0, Object(Service_Agent_Command_Exec), Object(Service_Agent_Transport_LocalTransaction))
#1 /usr/local/psa/admin/plib/Service/Agent/Transport/Local.php(26): Service_Agent_Transport_Local->_command(0, Object(Service_Agent_Command_Exec), Object(Service_Agent_Transport_LocalTransaction))
#2 /usr/local/psa/admin/plib/Service/Agent.php(140): Service_Agent_Transport_Local->process('d01779ab38c7b48...', Array)
#3 /usr/local/psa/admin/plib/Service/Agent.php(210): Service_Agent->commit()
#4 /usr/local/psa/admin/plib/Service/Driver/Filesystem/Plesk/Unix.php(300): Service_Agent->execAndGetResponse('filemng', Array)
#5 /usr/local/psa/admin/plib/Service/Driver/Filesystem/Plesk/Unix.php(31): Service_Driver_Filesystem_Plesk_Unix->_execAndGetResponse(Array)
#6 /usr/local/psa/admin/plib/FileManager.php(307): Service_Driver_Filesystem_Plesk_Unix->ls('mcdue', '/var/www/vhosts...', 'dirs', 'blocks', true)
#7 /usr/local/psa/admin/plib/FileManager.php(293): FileManager->ls_wrapper('dirs', '/var/www/vhosts...', true)
#8 /usr/local/psa/admin/plib/Smb/View/List/ContentFiles.php(71): FileManager->ls_dirs_wrapper('/var/www/vhosts...')
#9 /usr/local/psa/admin/plib/Smb/View/List/ContentFiles.php(53): Smb_View_List_ContentFiles->_checkPath('//test')
#10 /usr/local/psa/admin/plib/Smb/View/List/ContentFiles.php(43): Smb_View_List_ContentFiles->_getStateCurrentDir('/')
#11 /usr/local/psa/admin/plib/Smb/View/List/ContentFiles.php(82): Smb_View_List_ContentFiles->_getStateParam('currentDir', '/')
#12 /usr/local/psa/admin/plib/CommonPanel/View/List/Abstract.php(193): Smb_View_List_ContentFiles->_setupStateParams()
#13 /usr/local/psa/admin/plib/CommonPanel/View/List/Abstract.php(185): CommonPanel_View_List_Abstract->_setupList()
#14 /usr/local/psa/admin/smb/application/controllers/FileManagerController.php(429): CommonPanel_View_List_Abstract->__construct(Object(Zend_View), Object(Zend_Controller_Request_Http), Array)
#15 /usr/local/psa/admin/smb/application/controllers/FileManagerController.php(79): FileManagerController->_getFilesList()
#16 /usr/local/psa/admin/externals/Zend/Controller/Action.php(516): FileManagerController->listAction()
#17 /usr/local/psa/admin/externals/Zend/Controller/Dispatcher/Standard.php(295): Zend_Controller_Action->dispatch('listAction')
#18 /usr/local/psa/admin/externals/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#19 /usr/local/psa/admin/plib/Smb/Application/Web.php(39): Zend_Controller_Front->dispatch(NULL)
#20 /usr/local/psa/admin/smb/application/public/index.php(14): Smb_Application_Web->run()
#21 {main}

This will help? Sorry for my ignorance ... :eek:
 
Looks like your plesk is broken. Some plesk files were not fully copied to your server. You may have to run an autoinstaller again to upgrade or install any component hoping this will trigger plesk to get all the missing files.
 
Looks like database inconsistency.

Could you please post here output of following SQL queries:

mysql> select id,name,htype from domains where name like '%mcdue%'\G

and then use id as dom_id for the next query:

mysql> select www_root from hosting where dom_id='xxx';
 
mysql> select id,name,htype from domains where name like '%mcdue%'

results:

48;"mcdue.info";"vrt_hst"
49;"mcdue.mobi";"none"
50;"mcdue.net";"vrt_hst"
51;"mcdueserviziinternet.it";"vrt_hst"
190;"epp.mcdue.info";"vrt_hst"
252;"osesecurity.mcdue.info";"vrt_hst"
260;"templates.mcdue.net";"vrt_hst"
276;"joomla.mcdueserviziinternet.it";"vrt_hst"
299;"test.mcdue.net";"vrt_hst"

mysql> select www_root from hosting where dom_id='xxx';

per dom_id 50 (mcdue.net):

/var/www/vhosts/mcdue.net/httpdocs

per dom_id 299 (test.mcdue.net):

/var/www/vhosts/mcdue.net/test
 
Check also

mysql> select dom_id,www_root,sys_user_id from hosting where dom_id='299';

and

mysql> select * from sys_users where id=xxx;

where id is sys_user_id from previous query.
 
select * from sys_users where id=xxx;

id is 47
Code:
id 	login 	account_id 	mapped_to 	home                       	shell   	quota 	serviceNodeId
47 	mcdue 	181           	NULL        	/var/www/vhosts/mcdue.net 	/bin/false 	0      	1
 
Last edited:
Hello Igor and everyone!

Continuing my investigation of the problem :confused:, I realized that the directory for the new domains (created after the upgrade to version 11.5) have as owner:group the domain user and "psaserv", while all the old ones belong to root:root .
Now, trying to create a subdomain in one of these new domains everything runs smoothly: no problem. So, as I had suspected, the problem seems to be in the user's permissions on domain main directory. :eek:
In panel version 11.5, to whom must belong each of the domains directory in /var/www/vhosts/ ? To the user of each domain itself?

If so, did upgrader fail to change owner from root to the domain user for each domain :mad: or some other problem may be occurred? May I proceed to change the owner of each directory without screw up the server? :)

Thank you!
 
Thank you very much Igor!

With so much documentation, it is difficult for a non-expert to find the exact page with the information you need. :eek:

I noticed that on the page that you specified, the main directory of the subscription has "root" as group, while on my server, when I create a new subscription, the folder that is created has "psaserv" as group.
It may be acceptable or can be a symptom of some other problem?

Now I can proceed to change the owner of each folder.

Can I bother you one last time (I hope) for this problem? Can you suggest the syntax of a command to change the owner of each folder in /var/www/vhosts/ taking the user name from psa database?
Something like... for each directory look for the domain in the database, find the corresponding user and chown the directory...
But only if it is very fast for you, I do not want to take you any more time on this issue.

Thank you again!

Michele
 
I noticed that on the page that you specified, the main directory of the subscription has "root" as group, while on my server, when I create a new subscription, the folder that is created has "psaserv" as group.
It may be acceptable or can be a symptom of some other problem?

Correct permissions (with the latest 11.5.30 update 13) are:

0710/drwx--x--- user psaserv /var/www/vhosts/domain.tld
0711/drwx--x--x root psaserv /var/www/vhosts/system/domain.tld


Documentation is somewhat outdated, unfortunately.
 
Sorry, I can't understand what is the secret meaning of all these operations with vhosts permissions and why you can't use default settings. But if you need default behaviour - just use command:

# plesk bin repair --restore-vhosts-permissions
 
And thank you Igor for suggesting me the command
# plesk bin repair --restore-vhosts-permissions
That's just what I needed, but I'm not so expert in Plesk to know it. :eek:

Sorry, I can't understand what is the secret meaning of all these operations with vhosts permissions and why you can't use default settings.

Believe me ... I do not really want to use settings other than the defaults! :)
My problem is that my default settings were ... wrong. :(

All folders in /var/www/vhosts/ were owned by root:root. I did not modify them. I think they were like that far from earlier versions of the panel, or not?
After upgrading to version 11.5 I was not able any more to create domains or subdomains in existing subscriptions, because the panel could not create the corresponding directory within the main subscription directory due to the wrong owner.

This is the reason why I had to embark on this adventure... :D

Anyway, thanks as always to your precious help, the problem should now be solved.

Thank you!
 
Back
Top