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
https://forums.phpfreaks.com/topic/268440-permissions-help/
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
https://forums.phpfreaks.com/topic/268440-permissions-help/#findComment-1378459
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.