Hi
Here is what I am trying to do :
A long time ago, I installed a Gallery in my personal account on a shared server.
On the same server, I also have installed a phpBB forum (v2.0.15), in which I finally managed to embed another Gallery.
The forum users used to post their photos to my Gallery.
Now I am trying to copy the albums from my personal Gallery to the forum's Gallery.
I have tried via a shell, with the "cp -p ..." command, and via FTP, same result :
the files and directories, which belong to Apache, end up with the user/group of the user doing the copy (either me or the forum's user).
- the server's root user is unavailable at the moment.
- I don't like the "777" solution very much.
Anyone has another idea ?
one friend suggested building a PHP page that would have Apache make the files/directories copy, but that's beyond my PHP knowledge
Marmotte
----
Gallery version: 1.4.4pl6
Apache version: 2.0.48
PHP version (don't just say PHP 4, please): 4.3.4
Graphics Toolkit: N/A
Operating system: Linux 2.6.3
Web browser/version (if applicable): N/A
Posts: 3
One other thing :
both Galleries work fine, it's only the albums "migration" that I have a problem with.
Posts: 13451
There is no other way. Either chmod 777, or make a script that copies the files for you. If you had root access, you could copy the files and then chown (change ownership) to the apache user after you have finished copying.
Posts: 3236
Also, having the files owned by apache is no more secure than mode 777. The reason behind this is that if ALL files end up being owned by the apache user, then no matter what the apache user will have access to the files. So if they are 777, apache can access them. If they are owned by apache, apache can access them. Can you guess what process 99.9% of the types of attacks you are worrying about exploit? You guessed it... apache. So you are fucked if it happens either way.
Posts: 3
Thanks for the answers.
I made up a small PHP page to copy the albums (function copyr in the usercomments of the PHP manual )
now I've got to setup the permissions properly...