Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 25th February 2011, 03:50
SupuS SupuS is offline
HowtoForge Supporter
 
Join Date: May 2006
Posts: 202
Thanks: 68
Thanked 14 Times in 12 Posts
Default Problem with logs.php - script change ownership of user webs to root:root

Hi all,

today my logs.php script change ownership of all directories and files in /var/www to root:root. It did even more. It created 18 directories in /var/www and 2 in /root with weird names as:

Code:
drwxr-xr-x  2 root root 4096 Feb 25 00:30 ?@
drwxr-xr-x  2 root root 4096 Feb 25 00:30 ?y?????b??n6?Jc+???`??S?K
drwxr-xr-x  3 root root 4096 Feb 25 00:30 ???W?s??iq?_Cp??c??%?????-Z?-?
I don't know where is the problem. Script is from original installation and it worked well until today midnight.

For this time I can remove logs.php from crontab but it is not optimal solution.

I can partialy repair wrong permissions as till suggested in this post but group of files didn't repair and it is still set to root.

Question 1) Is there way how to change ownership to proper group?

Question 2) How I can fix the logs.php? I didn't do anything unusual. I only restored web from another ispconfig box on this server.

If I run this script it create weird directories and I get a lot of Warning messages:

Code:
# /root/ispconfig/php/php /root/ispconfig/scripts/shell/logs.php

Warning: fopen(/var/www/): failed to open stream: Is a directory in /root/ispconfig/scripts/shell/logs.php on line 92

Warning: mkdir(): File exists in /root/ispconfig/scripts/lib/classes/ispconfig_file.lib.php on line 175

Warning: fopen(/var/www/ŇďŠ3IěaŐRdľŔĂzĽŹę>fOˇ˙): failed to open stream: Is a directory in /root/ispconfig/scripts/shell/logs.php on line 92

Warning: mkdir(): File exists in /root/ispconfig/scripts/lib/classes/ispconfig_file.lib.php on line 175

Warning: fopen(/var/www/yb    n6Jc+`SK): failed to open stream: Is a directory in /root/ispconfig/scripts/shell/logs.php on line 92

Warning: mkdir(): File exists in /root/ispconfig/scripts/lib/classes/ispconfig_file.lib.php on line 175

ČŕűT▒AZ'r): failed to open stream: Is a directory in /root/ispconfig/scripts/shell/logs.php on line 92

Warning: mkdir(): File exists in /root/ispconfig/scripts/lib/classes/ispconfig_file.lib.php on line 175

Warning: fopen(/var/www/1ĆsJ ▒3NĆ8ČĽ
                                    Ľ): failed to open stream: Is a directory in /root/ispconfig/scripts/shell/logs.php on line 92

Warning: mkdir(): File exists in /root/ispconfig/scripts/lib/classes/ispconfig_file.lib.php on line 175

Warning: fopen(/var/www/sł2Ţ_HĆ9-Ă
                                     ćRĘgcqXw?ŰiC▒Yřň??ĐWNlľAup16ŮvFĆŢáOJć<Cą@ŽćSĺ4ĐľOŠzŘ4)ŐZM): failed to open stream: Is a directory in /root/ispconfig/scripts/shell/logs.php on line 92

Warning: mkdir(): File exists in /root/ispconfig/scripts/lib/classes/ispconfig_file.lib.php on line 175

Warning: fopen(/var/www/ĎńŚ[wsH/1ř*Şřvŕi?o▒ĆŔKX,"đOm)ŕaT4ľŠŹŚpOcH
                                                                         WťUľsM˝X**
                                                                                       SŽ`=˙): failed to open stream: Is a directory in /root/ispconfig/scripts/shell/logs.php on line 92

Warning: mkdir(): File exists in /root/ispconfig/scripts/lib/classes/ispconfig_file.lib.php on line 175

Warning: fopen(/var/www/mfůş˙): failed to open stream: Is a directory in /root/ispconfig/scripts/shell/logs.php on line 92

Warning: mkdir(): File exists in /root/ispconfig/scripts/lib/classes/ispconfig_file.lib.php on line 175

Warning: fopen(/var/www/@): failed to open stream: Is a directory in /root/ispconfig/scripts/shell/logs.php on line 92

Warning: mkdir(): File exists in /root/ispconfig/scripts/lib/classes/ispconfig_file.lib.php on line 175

Warning: fopen(/var/www/Đ"+ŰČć|cŹxrOEđeMr%ąŘRSćŃ88ť˝Qu;ľӴvEĆŤy2mgańYz▒@U{29şv▒gjEĎU˛Oj_Ć.*ěiďvxŽijyP&]ůŘG=ŤCđm): failed to open stream: Is a directory in /root/ispconfig/scripts/shell/logs.php on line 92

Warning: mkdir(): File exists in /root/ispconfig/scripts/lib/classes/ispconfig_file.lib.php on line 175

Warning: fopen(/var/www/;ŘeĘĄyěQsž6>Ő4r-v^vŻ_z^DXP}2ińę<r0pzqvĐM6HŤ&2IůTž): failed to open stream: Is a directory in /root/ispconfig/scripts/shell/logs.php on line 92

Warning: mkdir(): File exists in /root/ispconfig/scripts/lib/classes/ispconfig_file.lib.php on line 175

Warning: fopen(/var/www/ča5ˇH,wą5xYJ76Wńj?ŮŕőI˘*Š{ĽxuŰĐĎ
                                                                         {^yă˝cMłWaeACůľćŠUă!űGŘqćűĽe
&MԴűSŻŁKrťĂ.AQŽ4)7zż$hv2e>wj=Ť]Ĺ*pŢšň69): failed to open stream: Is a directory in /root/ispconfig/scripts/shell/logs.php on line 92jĂęi1sqOOZĎłyu;ťKKLv       ;żR

Warning: mkdir(): File exists in /root/ispconfig/scripts/lib/classes/ispconfig_file.lib.php on line 175

Warning: fopen(/var/www/ă|WoŚm▒o2ăaťˇţźţŔř^<eY): failed to open stream: Is a directory in /root/ispconfig/scripts/shell/logs.php on line 92

Warning: mkdir(): File name too long in /root/ispconfig/scripts/lib/classes/ispconfig_file.lib.php on line 175

Warning: fopen(/var/www/=j[dĚŤĎz`
                                 WČŁ$<vŠ˛{@rkđžZF[Ż5ĎKĺźĘ\WSb-Ń|▒wškDŇ6Ň@ż++vdĚľlŽG?*G;Tj(2šmť6ťěO
                                                                                                            aŔŮ_ĆŚ6˛`ěvOűACmh$ĎR
                                                                                                                                  -ă\Źw,
                                                                                                                                          [ąyĽŮ:dEř^K\ąŠ}Ň▒V}őq]~ľ79_ăU˘2Ă!>Ă4ţyN.h\`eńČĹH!ĎŞźF#`Ćh7
xŁ˝Bń,ŹPěů"▒Š+U>6)ĎŠFŮb˛u;O[Bş-Č): failed to open stream: File name too long in /root/ispconfig/scripts/shell/logs.php on line 92

Warning: mkdir(): File exists in /root/ispconfig/scripts/lib/classes/ispconfig_file.lib.php on line 175

Warning: fopen(/var/www/Ř<7ePţUŔą-˛Ć9ĺŔĽŘ.Ŕ/ć!Ď2Weńn): failed to open stream: Is a directory in /root/ispconfig/scripts/shell/logs.php on line 92

Warning: mkdir(): File exists in /root/ispconfig/scripts/lib/classes/ispconfig_file.lib.php on line 175

Warning: fopen(/var/www/Čă˙): failed to open stream: Is a directory in /root/ispconfig/scripts/shell/logs.php on line 92

Warning: mkdir(): File exists in /root/ispconfig/scripts/lib/classes/ispconfig_file.lib.php on line 175

Warning: fopen(/var/www/M9ŹČt;  _ZĎŚY*O     y;d =TŇŻuł[6ľD9_T-
                                                                       jů/$▒MŐťi d:qľbCŽ[č{ kyňłĘő˙): failed to open stream: Is a directory in /root/ispconfig/scripts/shell/logs.php on line 92

Warning: fclose(): supplied argument is not a valid stream resource in /root/ispconfig/scripts/shell/logs.php on line 108

Warning: fclose(): supplied argument is not a valid stream resource in /root/ispconfig/scripts/shell/logs.php on line 108

Warning: fclose(): supplied argument is not a valid stream resource in /root/ispconfig/scripts/shell/logs.php on line 108

Warning: fclose(): supplied argument is not a valid stream resource in /root/ispconfig/scripts/shell/logs.php on line 108

Warning: fclose(): supplied argument is not a valid stream resource in /root/ispconfig/scripts/shell/logs.php on line 108

Warning: fclose(): supplied argument is not a valid stream resource in /root/ispconfig/scripts/shell/logs.php on line 108

Warning: fclose(): supplied argument is not a valid stream resource in /root/ispconfig/scripts/shell/logs.php on line 108

Warning: fclose(): supplied argument is not a valid stream resource in /root/ispconfig/scripts/shell/logs.php on line 108

Warning: fclose(): supplied argument is not a valid stream resource in /root/ispconfig/scripts/shell/logs.php on line 108

Warning: fclose(): supplied argument is not a valid stream resource in /root/ispconfig/scripts/shell/logs.php on line 108

Warning: fclose(): supplied argument is not a valid stream resource in /root/ispconfig/scripts/shell/logs.php on line 108

Warning: fclose(): supplied argument is not a valid stream resource in /root/ispconfig/scripts/shell/logs.php on line 108

Warning: fclose(): supplied argument is not a valid stream resource in /root/ispconfig/scripts/shell/logs.php on line 108

Warning: fclose(): supplied argument is not a valid stream resource in /root/ispconfig/scripts/shell/logs.php on line 108

Warning: fclose(): supplied argument is not a valid stream resource in /root/ispconfig/scripts/shell/logs.php on line 108

Warning: fclose(): supplied argument is not a valid stream resource in /root/ispconfig/scripts/shell/logs.php on line 108

Warning: fclose(): supplied argument is not a valid stream resource in /root/ispconfig/scripts/shell/logs.php on line 108

Warning: readlink(): Invalid argument in /root/ispconfig/scripts/shell/logs.php on line 125

Warning: readlink(): Invalid argument in /root/ispconfig/scripts/shell/logs.php on line 125

Warning: readlink(): Invalid argument in /root/ispconfig/scripts/shell/logs.php on line 125
chown: cannot access `/var/www/\322\215\357\2513I\354a\004\325R\025d\265\004\006\300\303\003\237z\245\254\335\352': No such file or directory

Warning: readlink(): Invalid argument in /root/ispconfig/scripts/shell/logs.php on line 125
sh: -c: line 0: unexpected EOF while looking for matching ``'
sh: -c: line 1: syntax error: unexpected end of file

Warning: readlink(): Invalid argument in /root/ispconfig/scripts/shell/logs.php on line 125
sh: -c: line 0: unexpected EOF while looking for matching ``'
sh: -c: line 1: syntax error: unexpected end of file

Warning: readlink(): Invalid argument in /root/ispconfig/scripts/shell/logs.php on line 125
chown: cannot access `/var/www/1\306sJ\005': No such file or directory
chown: cannot access `\032\024\0363N\3068\310\245\v\307\245': No such file or directory

Warning: readlink(): Invalid argument in /root/ispconfig/scripts/shell/logs.php on line 125
sh: -c: line 0: syntax error near unexpected token `)'
sh: -c: line 0: `chown -R root:root /var/www/sł2Ţ_HĆ9-Ă
                                                          ćRĘgcqXw?ŰiC▒Yřň??ĐWNlľAup16ŮvFĆŢáOJć<Cą@ŽćSĺ4ĐľOŠzŘ4)ŐZM'

Warning: readlink(): Invalid argument in /root/ispconfig/scripts/shell/logs.php on line 125
chown: cannot access `/var/www/l\343W0.4\031\017\205\222\366\373YRY\263\345\260-\371': No such file or directory

Warning: readlink(): Invalid argument in /root/ispconfig/scripts/shell/logs.php on line 125
sh: -c: line 0: unexpected EOF while looking for matching ``'
sh: -c: line 1: syntax error: unexpected end of file

Warning: readlink(): Invalid argument in /root/ispconfig/scripts/shell/logs.php on line 125

Warning: readlink(): Invalid argument in /root/ispconfig/scripts/shell/logs.php on line 125

Warning: readlink(): Invalid argument in /root/ispconfig/scripts/shell/logs.php on line 125
sh: -c: line 0: unexpected EOF while looking for matching `"'
sh: -c: line 1: syntax error: unexpected end of file

Warning: readlink(): Invalid argument in /root/ispconfig/scripts/shell/logs.php on line 125
chown: cannot access `/var/www/\232': No such file or directory
sh: 2IůTž: command not found
sh: r0pzqvĐM6HŤ: No such file or directory

Warning: readlink(): Invalid argument in /root/ispconfig/scripts/shell/logs.php on line 125
sh: -c: line 0: unexpected EOF while looking for matching `''
sh: -c: line 1: syntax error: unexpected end of file

Warning: readlink(): Invalid argument in /root/ispconfig/scripts/shell/logs.php on line 125
sh: eY: No such file or directory
chown: cannot access `/var/www/\343': No such file or directory

Warning: readlink(): File name too long in /root/ispconfig/scripts/shell/logs.php on line 125

Warning: mkdir(): File name too long in /root/ispconfig/scripts/lib/classes/ispconfig_file.lib.php on line 175
sh: -c: line 0: unexpected EOF while looking for matching ``'
sh: -c: line 1: syntax error: unexpected end of file

Warning: readlink(): Invalid argument in /root/ispconfig/scripts/shell/logs.php on line 125
sh: 7ePţUŔą-˛Ć9ĺŔĽŘ.Ŕ/ć!Ď2Weńn: No such file or directory

Warning: readlink(): Invalid argument in /root/ispconfig/scripts/shell/logs.php on line 125

Warning: readlink(): Invalid argument in /root/ispconfig/scripts/shell/logs.php on line 125
chown: cannot access `/var/www/\226\365\022W\356s\266\023iq\331_Cp\251\347c\021\356%\211\366\a\024\353-Z\332-': No such file or directory

Warning: readlink(): Invalid argument in /root/ispconfig/scripts/shell/logs.php on line 125
chown: cannot access `/var/www/M9\254\310\022t': No such file or directory
sh: _ZĎŚY*O: command not found
sh: d: command not found

Warning: readlink(): Invalid argument in /root/ispconfig/scripts/shell/logs.php on line 125
sh: -c: line 0: syntax error near unexpected token `)'
sh: -c: line 0: `chown -R root:root /var/www/ńŠłu4fbI@HcŮĹ}-đĆkŔşMĹĚjć5)řćwww.piercingstyle.cz/log &> /dev/null'

Warning: asort() expects parameter 1 to be array, null given in /root/ispconfig/scripts/shell/logs.php on line 172

Warning: Invalid argument supplied for foreach() in /root/ispconfig/scripts/shell/logs.php on line 173
Any help welcome.

SupuS
Reply With Quote
Sponsored Links
  #2  
Old 25th February 2011, 15:09
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,745 Times in 2,578 Posts
Default

Did you change the log format of Apache's access log?

What's the output of
Code:
ls -la /var/www/
?
__________________
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 25th February 2011, 16:15
SupuS SupuS is offline
HowtoForge Supporter
 
Join Date: May 2006
Posts: 202
Thanks: 68
Thanked 14 Times in 12 Posts
Default

Quote:
Originally Posted by falko View Post
Did you change the log format of Apache's access log?

What's the output of
Code:
ls -la /var/www/
?
Hi falko,

I didn't change log format. On this box is Ubuntu 9.10 and it is production server so I don't test any new features on this server only standard upgrades and new hostings through ISPConfig.

Output of ls -la /var/www/ is:

Code:
# ls -la /var/www/
total 744
drwxr-xr-x 181 root                root 20480 Feb 25 12:24 .
drwxr-xr-x  17 root                root  4096 Aug 17  2010 ..
-rw-r--r--   1 root                root    45 Oct 31  2009 index.html
drwxr-xr-x   3 root                root  4096 Nov  2  2009 localhost
drwxr-xr-x   2 root                root  4096 Oct 31  2009 sharedip
drwxr-xr-x   9 zs10username         root  4096 Feb 25 02:18 web10
drwxr-xr-x   9 zs100username          root  4096 Feb 25 02:19 web100
drwxr-xr-x  10 zs102username      root  4096 Feb 25 02:19 web102
drwxr-xr-x   9 zs103username       root  4096 Feb 25 02:19 web103
....
....
....
lrwxrwxrwx   1 root                root    14 Jun  1  2010 www.domain.tld -> /var/www/web65
lrwxrwxrwx   1 root                root    14 Jul 18  2010 www.domain.tld -> /var/www/web78
lrwxrwxrwx   1 root                root    14 Dec 13  2009 www.domain.tld -> /var/www/web28
lrwxrwxrwx   1 root                root    14 Jul 11  2010 www.domain.tld -> /var/www/web74
lrwxrwxrwx   1 root                root    14 Jan 17  2010 www.domain.tld -> /var/www/web49
....
....
....
users web is now owned by regular users thanks to til post as I wrote in previous post but after last logs.php run all was owned by root. I also removed directories with "strange" names.

SupuS

Last edited by SupuS; 25th February 2011 at 18:32.
Reply With Quote
  #4  
Old 26th February 2011, 15:07
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,745 Times in 2,578 Posts
Default

Can you check if you have these two lines in your Apache configuration?

Code:
LogFormat "%v||||%b||||%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined_ispconfig
CustomLog "|/root/ispconfig/cronolog --symlink=/var/log/httpd/ispconfig_access_log /var/log/httpd/ispconfig_access_log_%Y_%m_%d" combined_ispconfig
Did you update Apache recently? Maybe it has something to do with such an update...
__________________
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
  #5  
Old 26th February 2011, 16:06
SupuS SupuS is offline
HowtoForge Supporter
 
Join Date: May 2006
Posts: 202
Thanks: 68
Thanked 14 Times in 12 Posts
Default

Quote:
Originally Posted by falko View Post
Can you check if you have these two lines in your Apache configuration?

Code:
LogFormat "%v||||%b||||%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined_ispconfig
CustomLog "|/root/ispconfig/cronolog --symlink=/var/log/httpd/ispconfig_access_log /var/log/httpd/ispconfig_access_log_%Y_%m_%d" combined_ispconfig
Did you update Apache recently? Maybe it has something to do with such an update...
Yes these lines are in apache2.conf. Last upgrade of apache was at the last year so I don't think it is related.

Last edited by SupuS; 27th February 2011 at 00:48.
Reply With Quote
  #6  
Old 6th March 2011, 21:43
SupuS SupuS is offline
HowtoForge Supporter
 
Join Date: May 2006
Posts: 202
Thanks: 68
Thanked 14 Times in 12 Posts
 
Default

I reenabled logs.php and it works fine. I suppose there was problem in log file but log files are about 500 MB size so I don't know where exactly.

Now remain only one problem and it is wrong group permission on clients directories and files. Group permissions are set to root but it should be set to clients group permission.

Is there the way to do it automaticaly through ISPConfig?

Thanks for help.

Edit: a used script from this post so my problem is solved.

SupuS

Last edited by SupuS; 11th March 2011 at 15:34.
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
Statistic not working mzo Installation/Configuration 49 20th April 2011 13:19
mail.err warnings and some mail unable to receive HellMind General 4 8th October 2010 20:57
Need some Hints to "The Perfect Server - Debian Lenny (Debian 5.0) [ISPConfig 3]" wahid HOWTO-Related Questions 10 25th August 2010 16:18
ISPConfig3 Mail Warn Errors reason8 General 3 25th November 2009 14:58
Automatic user creation script with PHP and SOAP Jose Gosalbez Installation/Configuration 2 24th May 2006 19:11


All times are GMT +2. The time now is 17:31.


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