Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 5th October 2010, 16:58
Jorem Jorem is offline
Senior Member
 
Join Date: Oct 2005
Posts: 139
Thanks: 5
Thanked 4 Times in 4 Posts
Default User en Group changed on all websites after adding site/domain

Big problems, a lot of mailboxes are down, and websites are not running because of the wrong file rights (775).

Yesterday I added a domain and now all the websites folders are changed to that group. The user changed to apache. And all files are 775 now.

Even /var/www was set to that user and group.

What I did so far:
- changed the logsize in de database, set all the user stats to u (update). Ran touch /home/admispconfig/ispconfig/.run to update them. A lot of the users where changed in the user directory, but not the group.
- changed the web size and saved. Al lot of users changed again on the files, but still no group changes.

What do I have to do/run/change to change all the users and groups to the correct ones?
What do I have to do to have the files changed to 755 again, and nog 775 like they are now?
Reply With Quote
Sponsored Links
  #2  
Old 6th October 2010, 14:38
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

Quote:
Originally Posted by Jorem View Post
What do I have to do/run/change to change all the users and groups to the correct ones?
Please use the chown command to correct this.
Code:
man chown
Quote:
Originally Posted by Jorem View Post
What do I have to do to have the files changed to 755 again, and nog 775 like they are now?
Use the chmod command:
Code:
man chmod
What's your ISPConfig version?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 6th October 2010, 23:14
Jorem Jorem is offline
Senior Member
 
Join Date: Oct 2005
Posts: 139
Thanks: 5
Thanked 4 Times in 4 Posts
 
Default

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:
1.
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

2.
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

3.
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

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

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

5.
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; 6th October 2010 at 23:17.
Reply With Quote
The Following User Says Thank You to Jorem For This Useful Post:
falko (7th October 2010)
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Statistic not working mzo Installation/Configuration 49 20th April 2011 12:19
Apache with mod_perl: user and group? angela Installation/Configuration 3 30th August 2010 11:23
Email problem 'Cannot set my user or group id.' (using ISPConfig 3 + OpenSuSE 11.2) urosm Installation/Configuration 5 19th June 2010 22:41
Help required in adding Domain Users to Local Powers Users group skirao Server Operation 0 28th August 2009 10:49
High on Lenny - Lvm Mount Problem Serverman Technical 1 23rd June 2009 16:26


All times are GMT +2. The time now is 00:21.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.