chown() problems

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Taorluath
    New Member
    • Sep 2007
    • 9

    chown() problems

    I just made a simple program to create files; I'm trying to get the hang of basic file manipulations.
    Whatever file my program makes, the owner of the file is "www-data," so I can't edit it using my regular server user. I can use root to change the ownership to the server user, but I don't want to do that for every file.
    That's why I tried to use chown() to give ownership to the server as soon as the file is made, but I get this error:

    "Warning: chown() [function.chown]: Operation not permitted in /home/server/mysite/make.php on line 17"

    chown(), chmod(), and chgrp() all apparently need root permissions.
    So how do I give PHP the permissions required to use these functions??
  • Taorluath
    New Member
    • Sep 2007
    • 9

    #2
    ideas anyone?
    I still can't seem to get it to work...

    Comment

    • rpnew
      New Member
      • Aug 2007
      • 189

      #3
      Originally posted by Taorluath
      ideas anyone?
      I still can't seem to get it to work...
      Hi,
      You can go through this link... this may help you.....
      click here

      Regards,
      RP

      Comment

      Working...