(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
(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
),
(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