Wrong Permission

Discussion in 'Install/Configuration' started by skyknight, Sep 10, 2013.

  1. skyknight

    skyknight New Member

    Hi,

    All my hosted application like opencart, prestashop can't generate file cache correctly. Application cache system generate file cache with 600 permission for file and 700 for folder.

    How to fix it so cache system on opencart, prestashop can genarate file with correct permssion?
  2. skyknight

    skyknight New Member

    if i switch back to apache, everything work fine, uploaded file will have correct permission.
  3. NiteWave

    NiteWave Administrator

    if you're using control panel (e.g. WHM/cPanel), ensure to enable php suExec mode.
  4. skyknight

    skyknight New Member

    I have enable php suExec mode on PHP suEXEC Quick Configuration and Auto Start set to yes. Still getting 600 for file and 700 for folder.

    I also try to run easyapache for several time and still error.
  5. Kevin K

    Kevin K New Member

    [solved]

    I have found to have the same issue today. PHP suexec is enabled in WHM and set to auto start in and run in litespeed. I have the same exact configuration on another server with no issues.

    I have reinstalled litespeed and rebuilt easyapache several times.

    If Litespeed is enabled, on upload the folders are set to 700 and files 600. If I switch to apache, the correct permissions are set at 755 and 644.

    How can I fix this or get someone to look into this?
    Last edited by a moderator: Dec 21, 2013
  6. NiteWave

    NiteWave Administrator

    not sure if this test script helps to trace the issue:
    PHP:
    <?php

    echo exec('umask');

    ?>
    run it under apache and litespeed, if the output same or not?
  7. Kevin K

    Kevin K New Member

    This is what I found, which makes sense why these issues are happening. Now to find why litespeed has this umask.


    Litespeed:

    Apache:

    I have checked other servers and they check out fine. It is is only happening on one of our servers. This all started when we ran easyapache to upgrade from php 5.3.27 to 5.3.28. No other settings were changed in the php build.
  8. NiteWave

    NiteWave Administrator

    then can you try lsphp-5.3.27 ?

    #cd /usr/local/lsws/fcgi-bin
    #ln -sf lsphp-5.3.27 lsphp5

    restart lsws, should back to 5.3.27
  9. Kevin K

    Kevin K New Member

    Same results
  10. NiteWave

    NiteWave Administrator

    what's the output if run the script under command line:

    #/usr/local/lsws/fcgi-bin/lsphp5 test.php
    #/usr/local/lsws/fcgi-bin/lsphp4 test.php
  11. Kevin K

    Kevin K New Member

    Working with your support, we found the issue. This was an issue with eAccelerator. I compiled without eAccelerator and the umask returned to 022. Then I recompiled again with eAccelerator and the umask stayed at 022.

    Hopefully this will help those that run into the same issue.

Share This Page