forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Miscellaneous => Topic started by: linuxhata on October 26, 2005, 07:26:17 pm

Title: failed to open stream: Permission denied in blablabla upload.php on line 1197
Post by: linuxhata on October 26, 2005, 07:26:17 pm
Hello.

I've moved existing gallery install to another host. copied all files, edited include files as followed, set permissions, exported base and re-imported it to new host. Everything works ok exept adding new photos. I'm getting this error:

Warning: move_uploaded_file(./albums/edit/mHTTP_temp_b46916b1.jpg): failed to open stream: Permission denied in /mounted-storage/home7/sub003/sc14289-FOQH/damireke.com/upload.php on line 1197

That happens when I try to add files in admin mode. with anon user, I'm simply getting "Destination directory albums/userpics/ is not writable by the script ! ", I've checked it, it's set to 755, tried 777, no luck

what can I do?
Title: Re: failed to open stream: Permission denied in blablabla upload.php on line 119
Post by: Joachim Müller on October 27, 2005, 08:02:20 am
1) Update to the most recent version cpg1.3.5
2) search the board for your error message before posting, this has ben asked a million times
Title: Re: failed to open stream: Permission denied in blablabla upload.php on line 1197
Post by: linuxhata on October 27, 2005, 09:09:41 am
I've searched, but all I get is people asking such question, and they are sent to search, and no ideas how to fix that
Title: Re: failed to open stream: Permission denied in blablabla upload.php on line 119
Post by: Joachim Müller on October 27, 2005, 09:19:22 am
did you update to cpg1.3.5 as I suggested?
Go through your search results from oldest to newest instead from newest to oldest and you'll get answers. After the ten millionth posting that asked the same, supporters became reluctant to answer, so they told people to search instead of posting the same thing over and over again. Actually, updating will solve all issues you have!
Title: Re: failed to open stream: Permission denied in blablabla upload.php on line 1197
Post by: linuxhata on October 27, 2005, 09:25:48 am
No I haven't upgraded yet and I don't think it's good idea for me, I have a lot of customisations done by myself, don't want to loose them.

I've found this:

When I try to upload a picture I get the error message Impossible to move somepic.jpg to albums/userpics/ | Warning: move_uploaded_file(/tmp/phpezCYKr) [function.move-uploaded-file]: failed to create stream: Operation not permitted. What's wrong?
You should contact the admin of your webhost because usually you can't change the location of the temporary directory for file uploads yourself (it is part of PHP configuration) .
If the open basedir restriction is in effect on your site then the temp directory for file uploads should be one that you can access.

But, for what should I ask my host support?
Title: Re: failed to open stream: Permission denied in blablabla upload.php on line 119
Post by: Joachim Müller on October 27, 2005, 09:30:54 am
For the very last time: upgrade, it's the only solution. Don't contact your webhost. Don't ask further questions. If you need details, use the (http://forum.coppermine-gallery.net/Themes/default/images/english/search.gif) (http://forum.coppermine-gallery.net/index.php?action=search)
Title: Re: failed to open stream: Permission denied in blablabla upload.php on line 1197
Post by: linuxhata on October 27, 2005, 10:14:23 am
Well, I did upgrade.

still can't upload

Destination directory albums/userpics/ is not writable by the script !
Title: Re: failed to open stream: Permission denied in blablabla upload.php on line 119
Post by: Joachim Müller on October 27, 2005, 12:06:32 pm
CHMOD as suggested. If you can't, then there's an ownership issue - CHOWN. If you're not allowed to do this, ask your webhost to CHOWN for you.
Title: Re: failed to open stream: Permission denied in blablabla upload.php on line 1197
Post by: linuxhata on October 27, 2005, 12:38:55 pm
What EXACTLY I should ask for?
if I'm getting:

Warning: move_uploaded_file(./albums/edit/mHTTP_temp_2a001d0b.jpg): failed to open stream: Permission denied in /mounted-storage/home7/sub003/sc14289-FOQH/damireke.com/upload.php on line 1197

Warning: move_uploaded_file(): Unable to move '/tmp/phpn7jUm9' to './albums/edit/mHTTP_temp_2a001d0b.jpg' in /mounted-storage/home7/sub003/sc14289-FOQH/damireke.com/upload.php on line 1197
Title: Re: failed to open stream: Permission denied in blablabla upload.php on line 119
Post by: Joachim Müller on October 27, 2005, 01:20:04 pm
CHMOD 777 or 755 (depending on your server config) as suggested in the docs. If this doesn't help, ask them to CHOWN to make the albums folder and everything in it owned by the user the webserver serive runs under. Again: use the search, as this has been discussed.
Title: Re: failed to open stream: Permission denied in blablabla upload.php on line 1197
Post by: linuxhata on October 27, 2005, 01:27:53 pm
As I've said in begining, CHMOD DOESN'T HELPS
Title: Re: failed to open stream: Permission denied in blablabla upload.php on line 1197
Post by: kegobeer on October 27, 2005, 03:21:50 pm
Check your /tmp folder and see if you have permission to move files.  Ask your host about it.
Title: Re: failed to open stream: Permission denied in blablabla upload.php on line 1197
Post by: linuxhata on October 27, 2005, 09:02:40 pm
I've checked everything again. For some strange reason, upload with anon now works, it doesn't works with registered users.
Title: Re: failed to open stream: Permission denied in blablabla upload.php on line 1197
Post by: kegobeer on October 27, 2005, 09:16:00 pm
I've checked everything again.

Permissions for the /tmp folder (not accessible via any FTP client) were never suggested; did you ask your host about it?

For some strange reason, upload with anon now works, it doesn't works with registered users.

If you haven't changed anything, this is most likely an issue with your webhost.

Things you should read:

General upload troubleshooting:
General upload troubleshooting. (http://coppermine.sourceforge.net/faq.php#uploadGeneralTroubleshooting)
Troubleshooting the upload process. (http://coppermine.sourceforge.net/tutorial/uploads/troubleshooting.php)
Title: Re: failed to open stream: Permission denied in blablabla upload.php on line 1197
Post by: linuxhata on October 27, 2005, 10:43:14 pm
Reasons it started working is that host support set chmod 777 to it from "their" account.

I've re-checked with various usernames, problem is only when using registered user.

I'll ask them to change permissions for tmp folder, thanks.
Title: Re: failed to open stream: Permission denied in blablabla upload.php on line 1197
Post by: linuxhata on October 27, 2005, 10:53:04 pm
I've fixed it. The problem is, that CHMODding main directory won't chmod sub-folders. I've chmodded them manually and problem is gone.
Title: Re: failed to open stream: Permission denied in blablabla upload.php on line 1197
Post by: kegobeer on October 27, 2005, 11:18:54 pm
If you have a control panel application, usually changing permissions on the parent transfers to the child; FTP clients may or may not work the same way.  Mileage may vary.   ;)
Title: Re: failed to open stream: Permission denied in blablabla upload.php on line 1197
Post by: linuxhata on October 27, 2005, 11:26:24 pm
Yes. CuteFTP won't CHMOD sub folders, that was the problem. Used site control panel instead - everything just fine now. (through I've lost my language localisation, since I was forced to upgrade to 1.35)
Title: Re: failed to open stream: Permission denied in blablabla upload.php on line 119
Post by: Joachim Müller on October 28, 2005, 12:11:37 am
restore your language file from your backup - the language files didn't contain bugfixes anyway.
Title: Re: failed to open stream: Permission denied in blablabla upload.php on line 1197
Post by: linuxhata on October 28, 2005, 12:26:35 am
Thanks!

Everything is fine now!

One more question. "This category contains albums that belong to Coppermine users." - where this text is located? I was unable to find it in english-utf8, but I do need it to translate
Title: Re: failed to open stream: Permission denied in blablabla upload.php on line 119
Post by: Joachim Müller on October 28, 2005, 12:30:09 am
we have a "one question per thread" policy you agreed to respect when signing up!

This is just a category description, you edit it where you edit all other categoriy description - in the category manager. If you would have searched the board instead of posting, you would have been able to find out on your own.
Title: Re: failed to open stream: Permission denied in blablabla upload.php on line 119
Post by: kegobeer on October 28, 2005, 01:26:56 am
That's in the database, in the categories table.