[Solved]: Owner/Group Issues [Solved]: Owner/Group Issues
 

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

Main Menu

[Solved]: Owner/Group Issues

Started by rphMedia, May 04, 2009, 03:34:02 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

rphMedia

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.

Hein Traag


rphMedia


Joe Carver

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

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

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

rphMedia

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

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.
It is a mistake to think you can solve any major problems just with potatoes.

rphMedia

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

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

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.
It is a mistake to think you can solve any major problems just with potatoes.