PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
alex.barylski
DevNet Evangelist
Posts: 6267 Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg
Post
by alex.barylski » Mon Feb 19, 2007 2:06 pm
I'm getting this error:
Code: Select all
The file "test.pdf" could not be uploaded: Unable to move '/tmp/phpnJFXY2' to '/home/virtual/site116/fst/var/www/html/owners/test.pdf'.
Everything uploads into the /html directory fine, but /html/owners throws this error???
Permissions in /owners is 775 so I'm sure it's not that...any ideas?
Mightywayne
Forum Contributor
Posts: 237 Joined: Sat Dec 09, 2006 6:46 am
Post
by Mightywayne » Mon Feb 19, 2007 2:08 pm
Have you turned it to 777 just to be sure?
alex.barylski
DevNet Evangelist
Posts: 6267 Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg
Post
by alex.barylski » Mon Feb 19, 2007 5:22 pm
My bad, I should have checked...thanks
Not sure I'm comfortable with that as a fix, but whatever
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Mon Feb 19, 2007 7:40 pm
You could FTP the files instead.
RobertGonzalez
Site Administrator
Posts: 14293 Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA
Post
by RobertGonzalez » Mon Feb 19, 2007 10:15 pm
Yeah, I'm not a big proponent of leaving my filesystem 777. Especially when allowing uploads. Is FTP not an option?
SteveMellor
Forum Commoner
Posts: 25 Joined: Mon Jun 26, 2006 7:43 am
Post
by SteveMellor » Tue Feb 20, 2007 6:06 am
You could (and I am thinking not only outside the box but quite far away from the whole package) have your upload script:
Target the directory you want to upload to
CHMOD it on the fly
Upload the file
CHMOD back
But that is overkill I think and I'm not sure it would work on some servers.
jayshields
DevNet Resident
Posts: 1912 Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England
Post
by jayshields » Tue Feb 20, 2007 6:52 am
AFAIK if you don't have the permission (via PHP) to upload files to a 755 folder then you won't have permission to CHMOD the folder to 777 either; it wouldn't make sense.
timvw (or anyone) is probably alot better to ask about something like this than me.