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]   Go Down

Author Topic: Unable to get permissions to work correctly (do I need silly_safe_mode??)  (Read 4189 times)

0 Members and 1 Guest are viewing this topic.

woozle

  • Coppermine newbie
  • Offline Offline
  • Posts: 8

I gave up trying to use Gallery because I couldn't get the permissions working, and after asking someone on my ISP's forums, they said they'd given up and started using Coppermine instead, and were able to get it to work.

However, annoyingly, I can't, so it's obviously *me* ;-)

Anyway, it all kinda looks ok, untill I try to upload a picture, and then it's just unable to display it.

Ironically, it's now working *less* than it was. Previously, I got it working to the point where it would display the thumbnail, but none of the other versions of the picture. Now it won't even display the thumbnail :-(

At one point, I checked out the config.inc.php and it had set silly_safe_mode to 1 - I don't know how it got set that way, does the install somehow detect that it's needed?

Is there any way I can check whether I do need that setting?

I've been playing around with the permissions to try and get it working, but nothing I do seems to work :-( (I have to use a combination of local and PHP-based filemanagers to be able to do it, because often the files just end up owned by nobody and then obviously my FTP client can't do anything with them...)

Any help would be REALLY appreciated!

Rob
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231

Does your config.inc.php have the code like this;
Code: [Select]
define('SILLY_SAFE_MODE', 1);,

or does it have the '//' comment marks.

A link would help, with a test user account with upload permissions.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

woozle

  • Coppermine newbie
  • Offline Offline
  • Posts: 8

It currently doesn't have silly_safe_mode defined at all...

I didn't take it out, but I didn't put it in in the first place either...

the gallery is at http://www.mutepanda.com/coppermine/

username is test

I'll PM you the password if that's OK.

Thanks,
Rob
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231

If it's a normal user password, no worry about posting it here, if it's an admin account, yes, use pm.

OK, add the code for the silly safe mode to the config.inc.php, near the top.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

woozle

  • Coppermine newbie
  • Offline Offline
  • Posts: 8

OK, added... do you think it's needed then, or are you just suggesting it to see what happens?
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231

OK Rob,

your pics are being created, but it seems there maybe an ht.access file causing this.  I tried to see your existing pic, which is 'coppermine/albums/userpics/10001/holly3.jpg', by typing the url direct, but got an 'access denied, you don't have permission' notice.

The same thing happened when I uploaded into an album I created.  When I uploaded to your test album, I couldn't check, as approval was needed first.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

woozle

  • Coppermine newbie
  • Offline Offline
  • Posts: 8

OK... I can see that you've tried to upload a picture, and can see all the details, but the picture isn't displaying. And that's entirely consistent with what I've seen all along.

But I really can't see any .htaccess anywhere from the coppermine directory downwards...

I just don't get it!

I'm very confused...
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231

Check to see that in config, the setting 'Default mode for pictures' is set at 666.  Check the chmod of the folders and the pics, so everyone can read.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

woozle

  • Coppermine newbie
  • Offline Offline
  • Posts: 8

It was set to 644 in the config so I've changed it to 666, but the latest attempt ended up the same...

userpics is already 777, as are 10001 and 10002. albums is 755.

After changing the config, the original, normal_ and thumb_ are all 666 but still can't be accessed...


Actually, though, look in the apache error logs, it says for each picture:

object is not a file, directory or symlink: correct path

Rob
Logged

woozle

  • Coppermine newbie
  • Offline Offline
  • Posts: 8

So, any more suggestions?  ???
Logged

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -

Use your FTP client to make /albums 755, userpics 755, as well as the pertinent user directories (10001, etc.) Make all pictures 755.  Change the config setting to 755 (only newly created pictures are affected by this setting).  You might also try 744, 754, 774, and 775.

Silly safe mode is not an issue for you, so you do not need to turn it on. When PHP has a safe mode issue, it well give you a definitive error.

To check if this is a .htaccess issue, you should FTP a pic directly into one the above folders, CHMOD it to 777, and then try to access it using the direct URL.  If you still cannot access it, then you have a .htaccess file lurking about somewhere, or you have a bizarre server config. 
Logged
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

woozle

  • Coppermine newbie
  • Offline Offline
  • Posts: 8

Thanks...

OK, so after faffing around with PHP scripts for managing files on the server to get around problems with stuff being owned by "nobody", I've got the following:

albums and userpics to 755. I've changed the config to have 755 for newly uploaded pictures. I've cleared everything out and tried to upload a new picture, but it's still not worked.  The picture is there, with its thumbnail, in albums/userpics (though not in a subdirectory - how do the numbered subdirectories get created?) and they're both 755. But they're still not viewable.

I'd already tried uploading a file directly into that directory, and that works fine, pretty much regardless of what permissions I set.

So it seems the problem is down to files being owned by "nobody" I guess?! But surely that's normal?
Logged

woozle

  • Coppermine newbie
  • Offline Offline
  • Posts: 8

Ah, turning off silly_safe_mode and trying again, it's created 10001 and added in the index.html that wasn't there before...

(though of course the effect hasn't changed)
Logged
Pages: [1]   Go Up
 

Page created in 0.031 seconds with 18 queries.