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!

is it possible to change default permissions for php generated files?

Discussion in 'General Discussion' started by ArbuZz, Feb 4, 2009.

  1. ArbuZz

    ArbuZz Active Member

    Joined:
    Mar 27, 2007
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    156
    We have a problem. When we generate file from php it is generated under user nobody and with 644 permissions. So that we can't delete it later from ftp. Is it possible to set somewhere something and tell php to create them as 666? We know there's something called umask, but we really do not know where it is set and how WHM/cPanel handles it. Could you advise us something please?
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,472
    Likes Received:
    421
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    You might want to consider moving to SuPHP. This will solve the problem as then all files created are owned by the user.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. nickp666

    nickp666 Well-Known Member

    Joined:
    Jan 28, 2005
    Messages:
    769
    Likes Received:
    2
    Trophy Points:
    168
    Location:
    /dev/null
    or you could use the chmod command in your php script, to change the permissions as the files are uploaded.

    http://www.php.net/chmod
     
    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