Permission Denied when writing to a file

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mouseit101

    #1

    Permission Denied when writing to a file

    Whenever i try to write to a file i get:
    Warning: fopen(dateLogFi le.txt): failed to open stream: Permission
    denied in **********.com/php/dateLog.php on line 10

  • Michael Trausch

    #2
    Re: Permission Denied when writing to a file

    mouseit101 wrote:[color=blue]
    > Whenever i try to write to a file i get:
    > Warning: fopen(dateLogFi le.txt): failed to open stream: Permission
    > denied in **********.com/php/dateLog.php on line 10
    >[/color]

    If you're running on a UNIX-like system, you need to use chmod on the
    command line or otherwise manipulate the file permissions, like via SFTP.

    'man chmod' (without the quotes) will get you the information that you need.

    In short, the web server traditionally runs as a user and group
    different from your own, so the file needs o+rw permissions to be read
    and written to, respectively.

    - Mike

    Comment

    • mouseit101

      #3
      Re: Permission Denied when writing to a file

      Thanks, I'll look into that.

      Comment

      Working...