The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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:
    6
    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:
    14,471
    Likes Received:
    199
    Trophy Points:
    63
    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.
     
  3. nickp666

    nickp666 Well-Known Member

    Joined:
    Jan 28, 2005
    Messages:
    770
    Likes Received:
    2
    Trophy Points:
    18
    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
     
Loading...

Share This Page