Current time: 11-18-2024, 01:43 AM Hello There, Guest! (LoginRegister)


Post Reply 
Maximum user id for this system is reached! And multiple subdomain problems.
Author Message
prale Offline
Junior Member
*

Posts: 92
Joined: Feb 2008
Reputation: 1
Post: #1
Maximum user id for this system is reached! And multiple subdomain problems.
Hello.

Lets start from the beginning.

I had the users:
sub1.domain1.com
sub2.domain1.com
sub1.domain2.com
sub2.domain2.com (with redirect alias from domain1.com)

(I don't use multiple subdomains on accounts because I like the openbasedir rule that every seperate user has)

I deleted the user sub2.domain2.com since I couldn't remove the alias (the error keeps saying there are still emailaccounts (indeed there was 1 forward from this alias), but even after I deleted it, still the same error).

Then I created a new user domain1.com.
After this, domain1.com was working great but I found out that the earlier subdomain users of this domain1.com (sub1.domain1.com and sub2.domain1.com) were not working any more, It shows the content of the user domain1.com.

I have other domains where this setup is working correct.
But there I first created a domain.com user and then the subdomain users.
(So maybe it went wrong because I added the maindomain after the subdomains were already created)

Anyway I tried some regeneration of the config files.
I tried to disable the subdomains, regenerate config and then activate the subdomains again (since then the maindomain was still there).
Also I tried to disable all users and enable the maindomains first and then the subdomains.
No luck. :S
Even a few sites went down, because they were already reactivated in the UI but the htdocs and all other maps/files were still in a subfolder with a prefix: .disabled
I had to copy them one folder back manualy from ssh.
(Probably I expect some chmod problems here, since I remember there was some trouble with it)

Now domain1.com still works but sub1.domain1.com and sub2.domain1.com not.

I upgraded today to the latest nightly.
Regenerated config, updated database etc, still no luck.

I tried even adding a new user:
test.domain1.com
but this user cannot be added

Here is some error info:
check_uid_gid_available() | ERROR: Maximum user id for this system is reached!

get_file() | ERROR: File '/etc/ispcp/proftpd/parts/proftpd.conf.tpl' does not exist !

(see attachment)
I fixed the userid problem:

/etc/ispcp/ispcp.conf was incomplete somehow after the upgrade from nightly to nightly:

This was present:
APACHE_SUEXEC_MIN_GID = 2000
APACHE_SUEXEC_MIN_UID = 2000

This not:
APACHE_SUEXEC_MAX_GID = 29999
APACHE_SUEXEC_MAX_UID = 29999

So the expression:
if($sys_uid > $max_uid){
push_el(\@main::el, 'check_uid_gid_available()', "ERROR: Maximum user id for this system is reached!");
return (2, $sys_uid, $sys_gid);
}

Would always be true, since $max_uid is not defined.
Somehow when I check test.domain1.com it gives me a error 404.
(At least not the content from domain1.com Smile like sub(1,2).domain1.com still do)
When I check the files of this user, there isn't even a htdocs folder.
(Only backups, errors, and phptmp)


Attached File(s) Thumbnail(s)
   
(This post was last modified: 11-12-2008 12:27 AM by prale.)
11-11-2008 11:42 PM
Find all posts by this user Quote this message in a reply
sci2tech Away
Senior Member
****

Posts: 1,285
Joined: Jan 2007
Reputation: 23
Post: #2
RE: Maximum user id for this system is reached! And multiple subdomain problems.
In my next commit I`ll add a patch to check ispcp.conf for missing variable. Problem is that for nightly updates ispcp.conf is not regenerated.
11-12-2008 01:57 AM
Visit this user's website Find all posts by this user Quote this message in a reply
prale Offline
Junior Member
*

Posts: 92
Joined: Feb 2008
Reputation: 1
Post: #3
RE: Maximum user id for this system is reached! And multiple subdomain problems.
Okay,

after I deleted the users:
sub1.domain1.com
sub2.domain1.com

and recreated them, both virtual folders were empty.

I created the errors, htdocs, cgi-bin, logs, and phptmp folders manually.
I had to chmod htdocs tot 777 :S otherwise I cant upload content in it with ftp.
Also phptmp needed to be chmodded or I get session errors.

Anyway I have the subdomains working again, and also the maindomain still shows the right content.

The folders parts and working were missing from /etc/ispcp/proftpd/
I had to create them manualy (as wel als /parts/proftpd.conf.tpl wich I took from SVN), and now the errors on the debug page are gone, as wel as the execute requests.

Still I think alot is messed up now, I guess more files are missing, and the chmods I had to do were probally not right to do.

What can I do?
I'm thinking of reupgrading to the latest nightly tomorrow.
And find a way out to regenerate/check al chmods and folders in /var/www/virtual/ without doing damage to the sites currently running.

Another way is to backup everything and do a new install, but I have a complicated config and also some trac environments on some domains, so I would like to keep thing the way they are.

What can I do?
Okay I used your super-lazy automated update script this time.
Thanx sci2tech Wink

It runned fine, so I guess I have the lastest SVN files now also in /etc

The only problem left now is the missing folders and chmods in some parts of /var/www/virtual

I have to regenerate/check them somehow
(This post was last modified: 11-12-2008 03:41 AM by prale.)
11-12-2008 02:42 AM
Find all posts by this user Quote this message in a reply
sci2tech Away
Senior Member
****

Posts: 1,285
Joined: Jan 2007
Reputation: 23
Post: #4
RE: Maximum user id for this system is reached! And multiple subdomain problems.
(11-12-2008 02:42 AM)prale Wrote:  Okay,
after I deleted the users:
sub1.domain1.com
sub2.domain1.com
and recreated them, both virtual folders were empty.
I created the errors, htdocs, cgi-bin, logs, and phptmp folders manually.
I had to chmod htdocs tot 777 :S otherwise I cant upload content in it with ftp.
Also phptmp needed to be chmodded or I get session errors.
Please check if user is added to /etc/shadow and /etc/groups
(11-12-2008 02:42 AM)prale Wrote:  The folders parts and working were missing from /etc/ispcp/proftpd/
I had to create them manualy (as wel als /parts/proftpd.conf.tpl wich I took from SVN), and now the errors on the debug page are gone, as wel as the execute requests.
that the way you suposed to do it Smile
(11-12-2008 02:42 AM)prale Wrote:  Still I think alot is messed up now, I guess more files are missing, and the chmods I had to do were probally not right to do.
It`s not messed up, but we do not have a script to update to nightly versions that work perfectly. Existing one do not update configuration files. A good way to do an upgrade to nightly is to keep your curent installed trunk from svn and do a compare to new version from svn (mostly changes to configuretion files) and manually merge it.
I`ll start working on a better update scripting when I`ll finish existing bugs from ispcp (if nobody else will come with a better version Wink ),
(11-12-2008 02:42 AM)prale Wrote:  What can I do?
I'm thinking of reupgrading to the latest nightly tomorrow.
Won`t solve, only a fresh install of ispcp will help, but you must migrate existing accounts.
(11-12-2008 02:42 AM)prale Wrote:  And find a way out to regenerate/check al chmods and folders in /var/www/virtual/ without doing damage to the sites currently running.
maybe it help this? (nicolas contribute from http://www.isp-control.net/forum/showthr...d+.my.cnf)
Code:
#!/bin/bash
#
# PROCESS DIRECTORY RIGHTS (OWNERSHIP & CHMOD)
#
# !!!! Edit path to mysql cnf file !!!!
mycnf=/home/manager/mysql.cnf

# sample mysql.cnf looks like this:
# [client]
# user=user_for_ispcp_database_usualy_root
# password=password_of_user

for domain_id in `echo "SELECT domain_id FROM ispcp.domain" | mysql --defaults-file=$mycnf -s`;
do
uid=`echo "SELECT domain_uid FROM ispcp.domain WHERE domain_id='$domain_id'" | mysql --defaults-file=$mycnf -s`;
gid=`echo "SELECT domain_gid FROM ispcp.domain WHERE domain_id='$domain_id'" | mysql --defaults-file=$mycnf -s`;
dmn=`echo "SELECT domain_name FROM ispcp.domain WHERE domain_id='$domain_id'" | mysql --defaults-file=$mycnf -s`;
echo "===========================================================";
echo " $dmn";
echo "===========================================================";

# process ftp
mkdir /var/www/virtual/$dmn
chown -vR vu$uid:vu$gid /var/www/virtual/$dmn
chmod 770 /var/www/virtual/$dmn
chown -v vu$uid:www-data /var/www/virtual/$dmn

mkdir /var/www/virtual/$dmn/backups
chown -vR vu$uid:www-data /var/www/virtual/$dmn/backups
chmod 770 /var/www/virtual/$dmn/backups

mkdir /var/www/virtual/$dmn/cgi-bin
chown -vR vu$uid:vu$gid /var/www/virtual/$dmn/cgi-bin
chmod 755 /var/www/virtual/$dmn/phptmp

mkdir /var/www/virtual/$dmn/errors
chown -vR vu$uid:vu$gid /var/www/virtual/$dmn/errors
chmod 775 /var/www/virtual/$dmn/errors

mkdir /var/www/virtual/$dmn/htdocs
chown -vR vu$uid:vu$gid /var/www/virtual/$dmn/htdocs
chmod -R -s /var/www/virtual/$dmn/htdocs
chmod -R 664 /var/www/virtual/$dmn/htdocs
find /var/www/virtual/$dmn/htdocs -type d -exec chmod 775 {} \;

chown -v vu$uid:www-data /var/www/virtual/$dmn/.ht*
chmod 640 /var/www/virtual/$dmn/.ht*

mkdir /var/www/virtual/$dmn/logs
chown -vR vu$uid:www-data /var/www/virtual/$dmn/logs
chmod 770 /var/www/virtual/$dmn/logs

mkdir /var/www/virtual/$dmn/phptmp
chown -vR vu$uid:www-data /var/www/virtual/$dmn/phptmp
chmod 770 /var/www/virtual/$dmn/phptmp

mkdir /var/www/fcgi/$dmn
chown -vR vu$uid:vu$gid /var/www/fcgi/$dmn
chmod 755 /var/www/fcgi/$dmn

done
11-12-2008 03:52 AM
Visit this user's website Find all posts by this user Quote this message in a reply
prale Offline
Junior Member
*

Posts: 92
Joined: Feb 2008
Reputation: 1
Post: #5
RE: Maximum user id for this system is reached! And multiple subdomain problems.
Hmmz this last script you gave me is nice, but I see I also mis .htgroup .htpasswd files in some virtual directories.
And who knows what else more.

I found out after the update script from you, new accounts are created perfectly again.

I found out only 4users have this problem.
Im going to backup, delete and re-create this users.

Also I will check all config files for changes.
I think it's easy since the files are all in trunk/configs/debian/
ohh yes before I forgot.
Thanks for your quick and great help! Wink
(This post was last modified: 11-12-2008 05:38 AM by prale.)
11-12-2008 05:36 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)