Permission denied?

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

    Permission denied?

    I am trying to make a new file using fopen, but I got a exception:
    failed to open stream: Permission denied in tmp/ ..

    I am using linux and I've already chmod the php file to 777.

    I tried adding exec("touch afile") in my php program and the result is
    there is no exception but no file come out.

    I am confused? how to control the permission in PHP?
    Thanks a lot

    fAnS.

  • Jerry Stuckle

    #2
    Re: Permission denied?

    fAnSKyer wrote:
    I am trying to make a new file using fopen, but I got a exception:
    failed to open stream: Permission denied in tmp/ ..
    >
    I am using linux and I've already chmod the php file to 777.
    >
    I tried adding exec("touch afile") in my php program and the result is
    there is no exception but no file come out.
    >
    I am confused? how to control the permission in PHP?
    Thanks a lot
    >
    fAnS.
    >
    Do you have permission to create files in tmp/? If this is being done
    on a web page, that would be the userid the webserver is running under.

    What's the actual fopen() you are using?

    --
    =============== ===
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.
    jstucklex@attgl obal.net
    =============== ===

    Comment

    • Gale

      #3
      Re: Permission denied?

      fAnSKyer wrote:
      I am trying to make a new file using fopen, but I got a exception:
      failed to open stream: Permission denied in tmp/ ..
      >
      I am using linux and I've already chmod the php file to 777.
      >
      I tried adding exec("touch afile") in my php program and the result is
      there is no exception but no file come out.
      >
      I am confused? how to control the permission in PHP?
      Thanks a lot
      >
      fAnS.
      >
      did you use chmod 777 on tmp dir by ftp or php ?

      Comment

      • fAnSKyer

        #4
        Re: Permission denied?

        thanks a lot
        it is because the permission for the tmp

        Sorry for such a stupid question :)

        Cheers
        FanS.


        Gale wrote:
        fAnSKyer wrote:
        I am trying to make a new file using fopen, but I got a exception:
        failed to open stream: Permission denied in tmp/ ..

        I am using linux and I've already chmod the php file to 777.

        I tried adding exec("touch afile") in my php program and the result is
        there is no exception but no file come out.

        I am confused? how to control the permission in PHP?
        Thanks a lot

        fAnS.
        >
        did you use chmod 777 on tmp dir by ftp or php ?

        Comment

        Working...