Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5

Thread: fopen

  1. #1
    Regular Coder
    Join Date
    May 2005
    Posts
    563
    Thanks
    0
    Thanked 3 Times in 3 Posts

    fopen

    Does anyone know why an fopen command would need 777 permissions and not work with 775? How do I fix this?

  • #2
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,859
    Thanks
    22
    Thanked 157 Times in 148 Posts
    Either set the correct permissions on the file when you initially upload it to your server, or chmod the file before you open it. I don;t know why you're having that problem with fopen -- permissions is usually a fwrite or fputs issue...
    Regards, R.J.

    ---------------------------------------------------------

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :-)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!
    ♪♪ …Need Web Hosting For My YouTube-To-Mp3 Conversion Software? Check Here !!… ♪♪

  • #3
    Regular Coder
    Join Date
    May 2005
    Posts
    563
    Thanks
    0
    Thanked 3 Times in 3 Posts
    I have to have every file and folder involved in the fopen set to 777. 775 just won't do it.

    admin
    admin/index.php
    admin/includes
    admin/includes/functions.php
    uploads

    All of those need to be set to 777. index.php includes functions.php which fopens a file in uploads.

    I've never had this problem before, and I'd really rather not have my files set at 777. The only difference I know of is that they are in directories protected by cpanel's directory protect function.

  • #4
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,859
    Thanks
    22
    Thanked 157 Times in 148 Posts
    That's strange, but if the files are in a .htaccess protected directory, I wouldn;t worry too much about it...no one's going to touch those files without the right username/password...
    Regards, R.J.

    ---------------------------------------------------------

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :-)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!
    ♪♪ …Need Web Hosting For My YouTube-To-Mp3 Conversion Software? Check Here !!… ♪♪

  • #5
    Senior Coder
    Join Date
    Sep 2005
    Posts
    1,791
    Thanks
    5
    Thanked 36 Times in 35 Posts
    775 will allow reading of files by 'other' but not writing. The options are to either chown (change the owner) chgrp (change group) or chmod the files so that the webserver user (www-data, www, 'nobody' etc.) has the appropriate role and permission


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •