Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Feb 2010
    Posts
    1

    Exclamation Umask file upload problem

    I am experiencing a umask problem with a PHP script that is managing image/file uploads. The resulting uploaded file has unix permissions of 600 and is therefore not readable by apache.
    I have checked the umask in
    /home/cpeasyapache/src/suphp.conf
    /opt/suphp/etc/suphp.conf
    and both are set to 0022 - which should give me 644 permissions.

    server default umask is set to 0022.
    php5 handler is set to suPHP so is Apache setting the incorrect umask on these files?
    If I use file manager or ftp to upload files i get the expected 644 permissions (umask 0022). There is no umask or chmod function in the PHP file upload script.

    Going slightly bonkers trying to find an answer.

    cPanel 11.25.0-R42404
    WHM 11.25.0 - X 3.9
    CENTOS 5.4 i686

  2. #2
    Registered User
    Join Date
    Jun 2004
    Posts
    312
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    Even with 0600, a webserver with SuPHP enabled should be able to read the file since PHP will run as the user that owns the file (assuming that is the case, which it should be if uploaded through PHP). I have a feeling you don't have SuPHP enabled and therefore files are being uploaded owned by 'nobody'.

    Double check Main >> Service Configuration >> Apache Configuration >> PHP and SuExec Configuration and make sure suphp is selected as the default handler.

Similar Threads & Tags
Similar threads

  1. File manager upload problem
    By dbosnjak in forum New User Questions
    Replies: 4
    Last Post: 12-01-2010, 06:00 AM
  2. Problem upload a file
    By ctrlaltdel0 in forum New User Questions
    Replies: 5
    Last Post: 05-21-2010, 03:18 AM
  3. Roundcube Upload File problem
    By wirenet in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 03-11-2009, 06:39 PM
  4. File mgr upload problem
    By garygable in forum cPanel and WHM Discussions
    Replies: 12
    Last Post: 09-06-2004, 09:13 AM
Tags for this Thread
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube