Jump to content

Recommended Posts

(This might be the wrong forum; it might be server-side configuration, but alas it is the code that *calls* fwrite, so I'll start here.)

 

I have written a script, and one thing it does is generate a file to disk using fwrite. No big deal.

 

Here's what interests me:

  • On most servers, the file is written successfully when the folder's permissions are 755 with recursive permissions.
  • On some servers, 755 fails. Only 777 works.

 

How could this be? Are permissions=permissions=permissions? Why will 755 work on one machine but not another?

 

I'm just a logic guy; I know very little of server-side configuration and/or why there would be a difference here. Just trying to learn.

Yes, as I stated above this may have been the wrong forum.

 

I understand the difference, ownership-wise, of 755 and 777, but I'm unclear on why different servers vary their behavior regarding fwrite permissions. I guess I should have Googled; others have had this issue...

http://www.css-resources.com/write-nearly-any-type-of-file-with-php.html

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.