LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > [RESOLVED]New files created with 664... how?

Reply
 
Thread Tools Display Modes
  #1  
Old 02-04-2010, 09:00 AM
SirKhan SirKhan is offline
New Member
 
Join Date: Feb 2010
Posts: 5
Question [RESOLVED]New files created with 664... how?

Hey guys!
I recently started to use LiteSpeed and I'm having trouble with the last configuration setting needed for my fully functional VPS: I need to get LiteSpeed to create new files with 664 instead of 644 like it's doing now. I'm using the built-in PHP suEXEC. I'm having this trouble with files created by WordPress but I assume it's the same for all web applications.

Please let me know how can this be achieved as it's driving me nuts.
Thank you,
Mark
Reply With Quote
  #2  
Old 02-04-2010, 09:44 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,585
You need to change umask from 022 to 002, update /etc/login.defs
Reply With Quote
  #3  
Old 02-04-2010, 11:02 AM
SirKhan SirKhan is offline
New Member
 
Join Date: Feb 2010
Posts: 5
Changed it, rebooted but didn't help. Still 644.
Reply With Quote
  #4  
Old 02-04-2010, 11:06 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,585
Try adding environment variable

UMASK=002

to the lsphp5 external app configuration under LSWS web console.
Reply With Quote
  #5  
Old 02-04-2010, 11:14 AM
SirKhan SirKhan is offline
New Member
 
Join Date: Feb 2010
Posts: 5
Did it and restarted and still no change. I'm using Debian by the way.
And thanks for the tips mistwang I really don't know what's up with this VPS :-(
Reply With Quote
  #6  
Old 02-04-2010, 11:41 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,585
There are many ways to change umask, you have to find out what works for your system.

Google, and try different methods, then run "umask" command from command line to verify that "0002" returns. then you will be good.
Reply With Quote
  #7  
Old 02-04-2010, 12:19 PM
SirKhan SirKhan is offline
New Member
 
Join Date: Feb 2010
Posts: 5
The user lsuser doesn't have ssh so I can't enter umask in command line as it will return the value set for root. I tried to set umask everywhere, etc/profile and login.defs in /home/lsuser/.profile and .bashrc, nothing works.
I even tried to set umask in wp-config.php to override default settings still nothing changes.
This is driving me crazy. Please help
Reply With Quote
  #8  
Old 02-04-2010, 03:14 PM
SirKhan SirKhan is offline
New Member
 
Join Date: Feb 2010
Posts: 5
Couldn't find a solution, I changed umask everywhere, tried to set up ACL recursively with default settings etc. still when I installed a plugin with WordPress it overrode everything.
So I searched and found a workaround:
define('FS_CHMOD_FILE', 0770);
define('FS_CHMOD_DIR', 0770);
You'll have to add this to the wp-config.php and this will chmod the files upon creation.
Reply With Quote
Reply

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


All times are GMT -7. The time now is 04:17 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.