Jump to content

Permissions help


krash11554

Recommended Posts

Im using the thumbnail function and im getting back

Warning: imagejpeg() [function.imagejpeg]: Unable to open 'uploads/profilepics/kyle.jpg' for writing: Permission denied in C:\inetpub\wwwroot\garage\phpfunctions\thumb.func.php on line 49.

i dont think it has to do with the code.

Any help is appreciated.

Link to comment
Share on other sites

permissions determine who has access to read, write, and execute the file or in the directory.  This has three sections: Owner, Group, Others and illustrated by a 10 'digit' association.

drwxrwxrwx.

Where the green d only applies if the item is a... directory. The absence of a character in the chain denotes removed permissions.

 

ownership is determined by the creator of the file

 

group permissions is determined by the groups associated with the creator of the file

 

users A user's id / group determines if they have access to a file as determined by the permissions illustrated above.

 

Your problem is that your web server (typically group www or www-data) does not have the proper permissions to write the image you are requesting.  There are two scenarios as to why:

[*]The folder is not writable by the user

[*]The file is not writable by the user

 

There are a slue of ways to fix this.  Changing permissions of the folder, the file, changing groups, changing ownership. 

Link to comment
Share on other sites

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.