Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1] 2   Go Down

Author Topic: failed to open stream: Permission denied in blablabla upload.php on line 1197  (Read 10267 times)

0 Members and 1 Guest are viewing this topic.

linuxhata

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50

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?
« Last Edit: October 28, 2005, 12:11:51 am by GauGau »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de

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
Logged

linuxhata

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50

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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de

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!
Logged

linuxhata

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50

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?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de

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)
Logged

linuxhata

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50

Well, I did upgrade.

still can't upload

Destination directory albums/userpics/ is not writable by the script !
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de

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.
Logged

linuxhata

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50

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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de

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.
Logged

linuxhata

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50

As I've said in begining, CHMOD DOESN'T HELPS
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website

Check your /tmp folder and see if you have permission to move files.  Ask your host about it.
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

linuxhata

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50

I've checked everything again. For some strange reason, upload with anon now works, it doesn't works with registered users.
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website

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.
Troubleshooting the upload process.
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

linuxhata

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50

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.
Logged

linuxhata

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50

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.
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website

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.   ;)
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

linuxhata

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50

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)
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de

restore your language file from your backup - the language files didn't contain bugfixes anyway.
Logged

linuxhata

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50

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
Logged
Pages: [1] 2   Go Up
 

Page created in 0.02 seconds with 21 queries.