Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Subdomain permission problem with upload

Discussion in 'General Discussion' started by Mr.Novo, Jun 24, 2018.

  1. Mr.Novo

    Mr.Novo Member

    Joined:
    Apr 9, 2017
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Istanbul
    cPanel Access Level:
    Root Administrator
    Hi,

    I'm receiving write error while uploading simple file to php application running under a subdomain. There is no error with php script while using domain.com/subdomain but throwing write permission error at subdomain.domain.com

    Also downloaded files via curl owned with nobody instead of account user
     
  2. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    2,721
    Likes Received:
    186
    Trophy Points:
    143
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @Mr.Novo

    Can you show the specific error you're receiving?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Mr.Novo

    Mr.Novo Member

    Joined:
    Apr 9, 2017
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Istanbul
    cPanel Access Level:
    Root Administrator
    Hi,

    Simple php upload script runs under a subdomain like up.domain.com throws permission denied error when target folder is chmod 755

    Warning: move_uploaded_file(uploads/1530201017.jpg): failed to open stream: Permission denied in /home/wp4/public_html/imgupload/index.php on line 28

    Warning: move_uploaded_file(): Unable to move '/tmp/phpcjiNRR' to 'uploads/1530201017.jpg' in /home/wp4/public_html/imgupload/index.phpon line 28


    Its fine when working under domain.com/up

    If i change folder to 777 and try to upload from up.domain.com, uploded file is owned by "nobody".
     
  4. Mr.Novo

    Mr.Novo Member

    Joined:
    Apr 9, 2017
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Istanbul
    cPanel Access Level:
    Root Administrator
    I think php handler (using cgi atm) causing this problem. But why with subdomains only ? Or was it always like that i wonder.
     
  5. Mr.Novo

    Mr.Novo Member

    Joined:
    Apr 9, 2017
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Istanbul
    cPanel Access Level:
    Root Administrator
    Switched to SuPHP that solved the problem :)
     
  6. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    2,721
    Likes Received:
    186
    Trophy Points:
    143
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    HI @Mr.Novo

    Thanks for letting us know, I'm glad you were able to find a solution to the issue.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice