Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: [Solved]: Owner/Group Issues  (Read 5925 times)

0 Members and 1 Guest are viewing this topic.

rphMedia

  • Contributor
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 515
  • ***muvipix.com***
    • muvipix - Music | Video | Pictures
[Solved]: Owner/Group Issues
« on: May 04, 2009, 03:34:02 pm »

I'm fairly certain that this isn't CPG's fault, but I could use a little assistance.

I moved from a hosted environment to a dedicated server a few months ago. I thought everything was working fine. Actually, it is on the surface.

But, when the user folders are being created, they're being assigned the correct permissions, but the owner/group remains Apache for some reason. Needless to say, I can't modify anything in the folders via FTP (was trying to add thumbnails).

I have complete access to the server and can probably change the individual permissions myself manually, but what setting(s) is/are causing this to begin with when they're created? The "include" folder is owned by me and is set at 755.
« Last Edit: May 04, 2009, 11:21:36 pm by Joachim Müller »
Logged

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: Owner/Group Issues
« Reply #1 on: May 04, 2009, 03:58:44 pm »

Could this have something to do with : http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#safe ?
Logged

rphMedia

  • Contributor
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 515
  • ***muvipix.com***
    • muvipix - Music | Video | Pictures
Re: Owner/Group Issues
« Reply #2 on: May 04, 2009, 04:01:02 pm »

No, no Safe Mode.

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1545
  • aka 'i-imagine'
    • Home Page
Re: Owner/Group Issues
« Reply #3 on: May 04, 2009, 04:13:35 pm »

Could there be a "sticky" .htaccess file over-riding your albums directory's settings?
You might want to try what your hosting company has in their control panel.
It might show more info. about who/what  owns the directory.

Some info. is here.
http://kb.mediatemple.net/questions/20/(ss)+Protecting+a+web+directory+using+WebControl+or+with+.htaccess

[off topic] your user name looked familiar......thanks for the great Visual Mod.! [/off topic]

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: Owner/Group Issues
« Reply #4 on: May 04, 2009, 06:05:07 pm »

Hi Ron,

Are you saying that, when you upload files via ftp they are owned by one person but when you upload via cpg they are owned by apache? That is expected behavior unless you do some nifty fiddling with apache. This is actually the most secure setting for these files.

As you have root access then look up the chown command and if possible use something like winscp for access (logging on as the root user). You can then run something like (group/owner/directory names may be different on your setup)
Code: [Select]
chown -R www-data.admin /www/yourdomain.com/public/htdocs/yourcgpinstall/albums
The -R switch means recursive. The name before the . is the owner and the name after the . is the group. The last bit I am sure you can work out for yourself.

Logged
It is a mistake to think you can solve any major problems just with potatoes.

rphMedia

  • Contributor
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 515
  • ***muvipix.com***
    • muvipix - Music | Video | Pictures
Re: Owner/Group Issues
« Reply #5 on: May 04, 2009, 06:17:57 pm »

Hm, this may solve my current problem (accessing the directories/files), but when more users create albums, won't I still have the same issue?

I've been using CPG for years and never ran across this problem before (or noticed it). Is it maybe a PHP5 only feature? All of my other CPG installs show the owner as the FTP Admin?

Thanks for the suggestions so far!

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: Owner/Group Issues
« Reply #6 on: May 04, 2009, 06:27:04 pm »

It is down to the way your particular linux distro is set up. PHP5 has nothing to do with it.

Get used to using winscp. You can have the chown in your stored list of command so one click and you can change ownerships. I would keep all files owned by apache. Add files such as thumbs as root then change the ownerships through chown when you have finished.

The more likely problem you will run into if you do not keep the files as something the script can write to is that you will loose the ability to remove or even upload files through coppermine (for instance, if you modify a file to an owner the scrip has no permission to write to). So it is good practise to set them before you logoff.

The joys of a dedicated server. ;D

You could modify your distro but unless you really know what you are doing then it is best to leave it alone as you could either break something or compromise security.

We are sort of wandering off the cpg topic now.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

rphMedia

  • Contributor
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 515
  • ***muvipix.com***
    • muvipix - Music | Video | Pictures
Re: Owner/Group Issues
« Reply #7 on: May 04, 2009, 07:14:39 pm »

Ah, I'm starting to understand a bit better now.

I've downloaded winscp and will give it a go a little later.

Thanks again for the advice and explanations.

rphMedia

  • Contributor
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 515
  • ***muvipix.com***
    • muvipix - Music | Video | Pictures
Re: [Solved]: Owner/Group Issues
« Reply #8 on: May 06, 2009, 01:12:58 pm »

Just to update, I ended up going with File Thingie • PHP File Manager - http://www.solitude.dk/filethingie/. Very simple and easy to use. As suggested, I didn't modify any server settings or change existing ownerships, but file modification/uploading is back to the way I want it.

Thanks all!

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: [Solved]: Owner/Group Issues
« Reply #9 on: May 06, 2009, 07:14:30 pm »

Glad you got it sorted. It looks like filethingie does the work server side so your files then become the property of apache (I'm guessing as I haven't tried it).

Good luck with your new server, having that bit of extra control really pays dividends. I'm sure you will very quickly pick up the management of it. I found some things confusing at first but got there in the end.
Logged
It is a mistake to think you can solve any major problems just with potatoes.
Pages: [1]   Go Up
 

Page created in 0.04 seconds with 19 queries.