|
|
Joined: Jul 2002
Posts: 135
Journeyman
|
Journeyman
Joined: Jul 2002
Posts: 135 |
Hey all.
Okay so.. users can upload avatars and everything works on the first one. But the pic they upload has the permission set to 644 so when they try to upload one over the existing one it won’t let them.
So, my question is how do I make it so the images that make it to the userpics file are 666 or 777 or whatever overwriting will require. Or am I missing something?
|
|
|
|
Joined: Oct 2003
Posts: 2,305
Old Hand
|
Old Hand
Joined: Oct 2003
Posts: 2,305 |
I am guessing your talking about through their MyHome so in changebasic.php find
if ( ($HTTP_POST_FILES['userfile']['tmp_name'] != "none") && ($HTTP_POST_FILES['userfile']['tmp_name']) ){ copy($HTTP_POST_FILES['userfile']['tmp_name'], "{$config['avatars']}/$Picturefile"); }
and change it to
if ( ($HTTP_POST_FILES['userfile']['tmp_name'] != "none") && ($HTTP_POST_FILES['userfile']['tmp_name']) ){ copy($HTTP_POST_FILES['userfile']['tmp_name'], "{$config['avatars']}/$Picturefile"); chmod("{$config['avatars']}/$Picturefile",0666); }
that should chmod the uploading file
|
|
|
|
Joined: Jul 2002
Posts: 135
Journeyman
|
Journeyman
Joined: Jul 2002
Posts: 135 |
Seems to be working great. Thanks!
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 69
Joined: January 2001
|
|
Forums63
Topics37,575
Posts293,931
Members13,823
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|