Click to See Complete Forum and Search --> : www / ftp - rights


JediSthlm
01-08-2003, 11:00 AM
Hi, this might be a easy one for all you hardcode linux souls.

I have a ftp server (glFtpd)
I run a www server (Apache)

I want to use the ftp to upload my files to a folder called www.
The www folder is accessable to the world thrue the Apache server.

The ftp needs to have the folders to 777 and the user and group to "root". (I believe that the ftp has its own rights,users and groups and it is not the same as the system)

The problem is that Apache needs the the folder to be 755 (right?) and the user and group to Apache.

So how do fix this problem?

HighOrbit
01-10-2003, 02:15 AM
Here is how I do this. I have 3 things running. A FTP session, a SSH session, and a web-browser.

I ftp the files upto a different directory, since I don't want my web document directory world writable. I then move it and chmod/chown by issuing shell commands in the SSH session. I then look at it in the web browser to make sure everything is working.

JediSthlm
01-10-2003, 03:57 AM
Thanx for fast answer.
I thought about the same way of doing it but instead of doing it manual I made a php script for it. After have uploaded the files to a "tmp" folder which I have 777 and root as user and group for the ftpd to work, I run the script from the website (push a button). The script then copies the new files to the "www" folder and chmod the files to 755 and change the user and group to apache.

If anyone else have a better solution I would be glad to here about it.