#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    2
    Rep Power
    0
    Hi all, I have written some scripts to a project website on sourceforge.net to keep log of the pages access and download number.

    Now the directory where the the log file are written into has to be chmoded 777 (write permission for all) but the server where I host my pages doesn't allow this mode.

    Anyway i open a file with the normal fopen function, is this possible that PHP can write to file only with 777 permission ?

    Thanks.
    Gabriele
  2. #2
  3. No Profile Picture
    anna
    Guest
    Devshed Newbie (0 - 499 posts)
    666 is enough!
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    2
    Rep Power
    0
    All right, thank a million.

    G. Gabriele
  6. #4
  7. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    >>Now the directory where the the log file are written
    >>into has to be chmoded 777

    Yes. That directory has to be chmoded 777 and the log file has to be 666. It doesn't matter PHP or Perl. But check with your webhost to make sure cuz it really depends on how their server was setup.

    I used to work for a webhost as a sysadmin. Many customers requested to have their root web directory chmodded 777 so their script can write to certain file in their root directory. So please check with your host to make sure.

Similar Threads

  1. Replies: 3
    Last Post: February 17th, 2004, 10:08 AM
  2. How to write a PHP script to remove a file?
    By xmxpcom in forum PHP Development
    Replies: 2
    Last Post: February 16th, 2004, 05:58 PM
  3. PHP file upload script trouble
    By casbboy in forum PHP Development
    Replies: 9
    Last Post: February 5th, 2004, 07:42 PM
  4. Simple find and replace word search for a text file with php?
    By rabid lemming in forum PHP Development
    Replies: 4
    Last Post: February 1st, 2004, 09:37 PM
  5. (13) Permission denied. Could not open transfer log file
    By corujo in forum Apache Development
    Replies: 0
    Last Post: January 31st, 2004, 08:28 PM

IMN logo majestic logo threadwatch logo seochat tools logo