network shared file system as home directory

izghitu

Well-Known Member
Aug 9, 2006
56
2
158
Hi,

I am trying to set up a load balanced solution with one webserver running cPanel. Basically I have 3 webservers, 1 running WHM/cPanel that I am using to set up and manage the accounts and 2 web servers running simple LAMP.

I've set up a shared network fs using lustre and mounted it as /home2 on the cpanel server. First time I added a new account everything worked fine. After terminating that account and re-adding it now I get the following:
Code:
safe_userchgid: chown: /home2/sstest/etc: Permission denied at /usr/local/cpanel/Cpanel/SafetyBits.pm line 93.
	Cpanel::SafetyBits::safe_userchgid(503, 12, '/home2/sstest/etc') called at /usr/local/cpanel/Whostmgr/Accounts/Create.pm line 876
	Whostmgr::Accounts::Create::_wwwacct('is_restore', 0, 'homedir', '', 'digestauth', undef, 'contactemail', '', ...) called at /usr/local/cpanel/Whostmgr/Accounts/Create.pm line 1934
	Whostmgr::Accounts::Create::__createaccount('hasshell', 1, 'domain', 'sstest.com', 'maxsub', 'unlimited', 'username', 'sstest', ...) called at /usr/local/cpanel/Whostmgr/Accounts/Create.pm line 1985
	Whostmgr::Accounts::Create::_createaccount('hasshell', 1, 'domain', 'sstest.com', 'maxsub', 'unlimited', 'username', 'sstest', ...) called at whostmgr/bin/whostmgr5 line 595
	main::wwwacct() called at whostmgr/bin/whostmgr5 line 224
When I check the account's homedir:
Code:
[email protected] [~]# ls /home2/sstest/
[email protected] [~]#
empty, no folders are being created. But again, first time I did this it worked fine

Any ideas why it wouldn't work?
Please help
 

izghitu

Well-Known Member
Aug 9, 2006
56
2
158
Found the issue, it does not work because the UID and GID that is used when creating the new account needs to exist on the lustre server.

So now the question is:
Is there any way to control the wwwacct script what UID/GID to assign to the new user? Any way to extract that using variables and pass it to the prewwwacct script?

Please help