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 25th October 2008, 05:59
kextra1 kextra1 is offline
Senior Member
 
Join Date: Apr 2008
Posts: 121
Thanks: 12
Thanked 10 Times in 6 Posts
Default File Permissions messed up

Hey guys,

I really messed up my file permissions.

Can anybody please post the results of

ls -al /var/www

So that I know that I've changed them back correctly.


Thanks for any help anyone can provide
Reply With Quote
Sponsored Links
  #2  
Old 25th October 2008, 13:26
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,769
Thanks: 840
Thanked 5,610 Times in 4,421 Posts
Default

ISPConfig should be able to fix the folder permissions. Run the following sql command in the database:

update isp_isp_web set status = 'u' WHERE status = '';

Then edite one site in the ispconfig interface, e.g. change the quota value and click on save.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 25th October 2008, 19:51
kextra1 kextra1 is offline
Senior Member
 
Join Date: Apr 2008
Posts: 121
Thanks: 12
Thanked 10 Times in 6 Posts
Default What I did

Thanks for your response Till,

I had been ill for a few days and I dont know what I was thinking when I messed up the permissions. This is what I did, I noticed that one of my domains had the groups all set too nobody. I never fooled around with getting suPHP working so I do remember changing some files and directories to www-data a long time ago.

I went to /var/www and did this.

server:/var/www#chgrp -R web10 web10/

I don't know what I was thinking. Anyways, it changed all the directories and everything to the nobody group and www-data user.

I should have used:

chown -R user:group directory

but i wasnt thinking and it changed everything in the /var/www directory to the nobody group and the www-data user.

Anyways I fixed the permissions manually. It also changed the permissions of my symlinks though.

...so I used:

chown -h www.websitename.com

on all the symlinks. I also chgrp'd the directories:

apache-default
sharedip
localhost
webalizer

to the root group which i was only guessing was correct.

Also, all the www.websitename.com symlinks belong to the user:

www-data

which im not sure is correct or not. I appreciate all your help btw.

I'm kinda nervous to do anything quickly now, as i dont want to mess anything else up.

When you mentioned to:

update isp_isp_web set status = 'u' WHERE status = '';

Should I do this within phpmyadmin in ispconfigdb?

Thanks again for your help.
Reply With Quote
  #4  
Old 25th October 2008, 20:17
kextra1 kextra1 is offline
Senior Member
 
Join Date: Apr 2008
Posts: 121
Thanks: 12
Thanked 10 Times in 6 Posts
Default Okay - Still one thing

Okay, I followed your instructions:

mysql -uroot -ppassword

use ispconfigdb

update isp_isp_web set status = 'u' WHERE status = '';

..then I logged into ispconfig and changed the quota...it appears it took, but it also took before i sent the sql command. I haven't really noticed any changes.

I checked the permmissions in /var/www/www.testsite.com

They still show up as the group being nobody.

ls -al

webadmin as the user
nobody as the group

I can't believe i've done so much damage with one lowsy command. chown -R web10 web10 in the /var/www directory

Also, when i create a new domain, phptmp shows up as the user www-data instead of the domainadmin user...and i dont think it's sending the welcome email.

Any advice would be appreciated! Thanks a million again.

kextra1

Last edited by kextra1; 25th October 2008 at 20:31.
Reply With Quote
  #5  
Old 25th October 2008, 22:08
kextra1 kextra1 is offline
Senior Member
 
Join Date: Apr 2008
Posts: 121
Thanks: 12
Thanked 10 Times in 6 Posts
 
Default Permissions now

Okay, I went though by hand and changed the permissions back to as normal as I could.

I created a test domain and here is the output

auatest@chronikal:/var/www/web81$ ls -al
total 44
drwxr-xr-x 9 jakemoti web81 4096 2008-10-25 13:58 .
drwxr-xr-x 28 root root 4096 2008-10-25 12:51 ..
drwxrwxr-x 2 jakemoti web81 4096 2008-10-25 12:51 cgi-bin
-rw------- 1 jakemoti web81 24 2008-10-25 13:58 .forward
drwxrwxr-x 3 jakemoti web81 4096 2008-10-25 12:51 ftp
drwxr-xr-x 2 jakemoti web81 4096 2008-10-25 12:51 log
lrwxrwxrwx 1 root root 36 2008-10-25 13:58 Maildir -> /var/www/web81/user/jakemoti/Maildir
drwxrwxrwx 2 jakemoti web81 4096 2008-10-25 12:51 phptmp
-rw-r--r-- 1 root root 450 2008-10-25 13:58 .procmailrc
lrwxrwxrwx 1 root root 43 2008-10-25 13:58 .spamassassin -> /var/www/web81/user/jakemoti/.spamassassin/
drwxr-xr-x 2 jakemoti web81 4096 2008-10-25 12:51 ssl
drwxr-xr-x 4 jakemoti web81 4096 2008-10-25 13:53 user
lrwxrwxrwx 1 root root 44 2008-10-25 13:58 .vacation.cache -> /var/www/web81/user/jakemoti/.vacation.cache
drwxrwxr-x 3 jakemoti web81 4096 2008-10-25 12:51 web
auatest@chronikal:/var/www/web81$

Which I thought seems okay. The only thing is, I've noticed there is no:

.htpasswd

The symbolic link file in /var/www is listed as:

lrwxrwxrwx 1 www-data web81 14 2008-10-25 12:51 www.auamoti.com -> /var/www/web81

I thought the .htpasswd file should have been created when the domain was created.

Any Idea's?

Thanks,

kextra1

Last edited by kextra1; 25th October 2008 at 22:25.
Reply With Quote
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
Postfix delivery problem erebus Installation/Configuration 8 29th July 2014 21:17
Chroot SSH + ISPConfig Norman Installation/Configuration 27 26th March 2007 04:40
HotSaNIC domino Tips/Tricks/Mods 23 6th November 2006 06:19
[ISPconfig Install] Cannot allocate memory Cordoban Installation/Configuration 3 25th August 2006 14:20
Install Error on Debian 3.1 planet_fox Installation/Configuration 4 25th June 2006 18:03


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


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