View Single Post
Old 7th October 2010, 00:14
Jorem Jorem is offline
Senior Member
Join Date: Oct 2005
Posts: 139
Thanks: 5
Thanked 4 Times in 4 Posts

Thanks for the reply falko.

This is what I did to get everything running again.
This can be a lot of work, but with a xml template I could create a webpage that generated this commands for all websites on my system.

First I changed the ssi to 1 on all website in the database with the sql command:
UPDATE `isp_isp_web` SET `web_ssi` = '1';

Than changed the status to u (update):
UPDATE `isp_isp_web` SET `status` = 'u';

Also changed user setting (you can set this back afterwards)
UPDATE `isp_isp_user` SET `spam_rewrite_subject` = '0';
Ans set the status to update.
UPDATE `isp_isp_web` SET `status` = 'u';

Than I ran the command: touch /home/admispconfig/ispconfig/.run

The website user on the folders in /var/www and a lot of subdirectories allready changed. But not all and permissions were still 775 on all files.

To change the rest of the files I did this:
cd /var/www
find . -type d -print0 | xargs -0 chmod 755
find . -type f -print0 | xargs -0 chmod 644

changes all folder permissions to 755 and files permissions to 644

chown root:root cgi-bin
chown root:root error
chown root:root html
chown root:root icons
chown root:root manual
chown root:root localhost

default files/folder to user and group root

chown -R adminusername:web10 --from=apache:web231 web10

changes the wrong user=apache and group=web231 to user=adminusername and group to the name op de website folder (web10 for example). Last is to do this in the folder web10

chown -R :web10 --from=:web231 web10

change all groups that are set to web231 to web10 in folder web10

cd web10
chown root:root .procmailrc
chown root:root .forward
chown root:root .spamassassin
chown root:root .vacation.cache
chown root:root Maildir
chown root:root passwd.dav

changes default files/folders user and group to root

/// Extra. for my CMS I used this to changes the permissions of some files and directories. You can change these to your own needs. This a just as an example (for CMSMS).

cd web
chmod 644 config.php
chmod 777 -R uploads
chmod 777 tmp
cd tmp
chmod 777 cache
chmod 777 templates_c

After changing all the files the server ran fine again .

Last edited by Jorem; 7th October 2010 at 00:17.
Reply With Quote