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

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 30th December 2012, 15:50
fatbear fatbear is offline
Member
 
Join Date: Jul 2010
Location: Raleigh, NC US
Posts: 41
Thanks: 4
Thanked 9 Times in 4 Posts
Default Changing Umask Leads to mod_fcgid errors

To enhance security, I changed my system umask in /etc/profile to 007. After this, creating new websites would no produce websites that could use PHP. I got errors such as:

Code:
[Sun Dec 30 09:13:25 2012] [warn] [client 184.82.147.162] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Sun Dec 30 09:13:25 2012] [error] [client 184.82.147.162] Premature end of script headers: index.php
I tracked the problem down to the entries in the /var/www/php-fcgi-scripts directory that were now created with 750 instead of 755 mode. Once I manually changed the entries back to 755, everything worked again.

In looking at the code, I see in:

/usr/local/ispconfig/server/plugins-enabled/apache2_plugin.inc.php

on line 958:

exec('chmod 755 '.$fcgi_starter_script);

That is fine for modifying the mode of the .php-fcgi-starter file, but the directory is created on line 925 and is created with the default umask. That's the problem. So, before this line, I inserted:

umask(022);

and all worked again.

Perhaps this umask should be in a more global or earlier location. Can any of the devs suggest a more permanent fix?
__________________
Steve Amerige, Fat Bear Incorporated
Server Leasing | Web Software Development | User Experience & Graphic Design
Managed Services, Website, Java, and Source-Code Hosting
Did my post help you? Click the Thanks button!
Reply With Quote
Sponsored Links
  #2  
Old 30th December 2012, 18:10
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 36,202
Thanks: 829
Thanked 5,420 Times in 4,262 Posts
Default

In ISPConfig 3.0.5 RC1, the umask is set globally in the server.sh script for the ispconfig proces, so your problem can not accur in the latest ispconfig version.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 30th December 2012, 19:02
fatbear fatbear is offline
Member
 
Join Date: Jul 2010
Location: Raleigh, NC US
Posts: 41
Thanks: 4
Thanked 9 Times in 4 Posts
Default

Hi Till,

Thanks for the reply. It's good to know. Of course, I tend to only update to stable versions and the current stable version is 3.0.4.6. Do you know when the 3.0.5 version will become the stable version?

Again, thanks!
__________________
Steve Amerige, Fat Bear Incorporated
Server Leasing | Web Software Development | User Experience & Graphic Design
Managed Services, Website, Java, and Source-Code Hosting
Did my post help you? Click the Thanks button!
Reply With Quote
  #4  
Old 30th December 2012, 23:31
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 36,202
Thanks: 829
Thanked 5,420 Times in 4,262 Posts
 
Default

Quote:
Of course, I tend to only update to stable versions and the current stable version is 3.0.4.6.
Thats recommended, do not use a beta or rc on production systems.

Quote:
Do you know when the 3.0.5 version will become the stable version?
In january.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
fatbear (30th December 2012)
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
FuzzyOcr Errors danielvm HOWTO-Related Questions 0 31st October 2010 17:05
Fedora 10 - Virtual Users And Domains With Postfix, Courier etc j.smith1981 Server Operation 6 17th February 2010 01:01
chgrp error new user DKA General 15 28th July 2008 17:45
Anonymous FTP fails with 503 error RAMilewski Installation/Configuration 12 16th April 2007 14:00
PHP Errors in the "WEB-FTP" module crudolphy General 9 27th December 2005 20:17


All times are GMT +2. The time now is 14:30.


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