[RESOLVED]New files created with 664... how?

Discussion in 'Install/Configuration' started by SirKhan, Feb 4, 2010.

  1. SirKhan

    SirKhan New Member

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

    mistwang LiteSpeed Staff

    You need to change umask from 022 to 002, update /etc/login.defs
  3. SirKhan

    SirKhan New Member

    Changed it, rebooted but didn't help. Still 644.
  4. mistwang

    mistwang LiteSpeed Staff

    Try adding environment variable

    UMASK=002

    to the lsphp5 external app configuration under LSWS web console.
  5. SirKhan

    SirKhan New Member

    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 :-(
  6. mistwang

    mistwang LiteSpeed Staff

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

    SirKhan New Member

    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 :(
  8. SirKhan

    SirKhan New Member

    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.

Share This Page