|
Posted by Ohmster on 06/27/05 07:55
I posted this to the online help forum at the coppermine galleries:
http://tinyurl.com/b254u
....but have not gotten help with it yet, this might be a regular linux
config issue so I will post it here to see if anyone can help. This is
coppermine:
http://coppermine.sourceforge.net/
I have Coppermine 1.3.3 installed and love it, this is my second install
of Coppermine. The system is a home Fedora Core install online via always
on ADSL connection with a FQND. I run httpd-2.0.52-3.1 (apache),
ImageMagick-6.2.2.0-2.fc3, php-4.3.11-2.5, mysql-3.23.58-16.FC3.1. I do
not have SELinux installed. My previous install on Redhat 9 with GD
worked perfectly for so long. I had to take down that server because the
system got compromised by spammers who got in through apache somehow,
might have been because of an early version of phpbb2 so I wiped the
system and installed FC3 and am not using phpbb2 anymore. The computer is
in my home and I access it either directly or via ssh from my XP machine
on the home LAN. I can copy files to it with samba or FTP.
Coppermine 1.3.3 really works good and I put photos on it via batch mode
by dumping pictures on it in the /albums directory and then use batch
mode to install the pictures. This works really well as before but any
thumbnails or normal photos that convert creates are now owned by apache
and not by me in my $HOME/public_html/cpg133/ablums/<album name>
directory. Here is an example, I will do an ls in one of the album
directories so you can see what is happening:
[ohmster@ohmster Baby_Pictures]$ ls -la
total 1356
drwxrwxrwx 2 ohmster ohmster 4096 Jun 26 00:32 .
drwxrwxrwx 10 ohmster ohmster 4096 Jun 26 03:36 ..
-rw-rw-rw- 1 ohmster ohmster 426953 Jun 26 00:29 IMG_0201.JPG
-rw-rw-rw- 1 ohmster ohmster 442525 Jun 26 00:29 IMG_0202.JPG
-rw-rw-rw- 1 ohmster ohmster 375180 Jun 26 00:29 IMG_0203.JPG
-rw-r--r-- 1 apache apache 23890 Jun 26 00:32 normal_IMG_0201.JPG
-rw-r--r-- 1 apache apache 25204 Jun 26 00:32 normal_IMG_0202.JPG
-rw-r--r-- 1 apache apache 23262 Jun 26 00:32 normal_IMG_0203.JPG
-rw-r--r-- 1 apache apache 8268 Jun 26 00:32 thumb_IMG_0201.JPG
-rw-r--r-- 1 apache apache 8593 Jun 26 00:32 thumb_IMG_0202.JPG
-rw-r--r-- 1 apache apache 8352 Jun 26 00:32 thumb_IMG_0203.JPG
[ohmster@ohmster Baby_Pictures]$
Notice that the pictures that I uploaded belong to me, ohmster. All of
the normal and thumbnail pictures that were created by Coppermine and
convert now belong to user "apache". This is a pain because I would have
to now become superuser in order to gain ownership of the images again.
My previous install of Coppermine with GD never did this, any files or
images created by Coppermine and GD were owned by me as they should be. I
see no options anywhere in Coppermine to set ownership of files or
photos. How do I fix this and make it so that any files or images created
by Coppermine or convert belong to me? Is this a configuration setting
outside of Coppernine or something? Other than this issue, Coppermine
really works great and I have little problems with it. Please help.
NOTE - One fellow replied in the forums and it seemed like he was on
track:
---------------------------------------------------------------------How
about the config.inc.php? Coppermine writes that during the install
process - who's the owner of that file?
Have you done an exec('whoami') to see who owns the php process?
<?php
echo exec('whoami');
?>
---------------------------------------------------------------------
I checked what he said;
[ohmster@ohmster include]$ pwd
/home/ohmster/public_html/family/cpg133/include
[ohmster@ohmster include]$ ls -la config.inc.php
-rw-r--r-- 1 apache apache 518 Jun 26 00:13 config.inc.php
[ohmster@ohmster include]$
Yes, the configuration file is owned by apache. Changing ownership of it
to me did not help. I am not sure what he is telling me with is code
snippet because I cannot run that from the CLI.
He replied...
---------------------------------------------------------------------
I thought that would spit out the owner of the php process. Try
substituting system("whoami") for echo exec("whoami").
If config.inc.php is owned by apache, then I think the PHP processes are
executed under the apache user, hence the ownership issue. Anything
written under a php script will show the apache user as the owner. You
can try writing a few test scripts that write to the server and see if
the apache user is indeed the owner.
Now, how to change it - that I don't know. Have you checked out the
Fedora forums?
---------------------------------------------------------------------
So there we have it. Apache is running the convert program to produce the
thumbnails and other images, as directed by php, being run by me in my
home dir, what can I do so that the files created by convert/apache/php
belong to me and not to apache? All of this did work on a redhat 9 system
that used GD instead of ImageMagick.
Thanks,
Ohmster
--
~Ohmster
"Read Ohmster" in subject, bypass spam filter.
ohmster /a/t/ newsguy dot com
Navigation:
[Reply to this message]
|