NavigationUser loginSpam?See spam posts on this site? If so, please don't reply to the spam! Instead, just report the URL to the webmaster. |
unwanted httpd filesHi -- I manage a web site using a wiki. In one section of the site when I create a file it has a httpd extension. This means it belongs to Apache and I can't change the permissions on it -- which I need to do. Everywhere else on the site the program creates files that are owned by me. I can't see what causes this difference. What causes a httpd file to be created? jedson (I hope this is the right place for this.) |
unwanted httpd files
Any file that is created on a site that apache runs is owned by apache. What exactly do you mean by extension? Is it the ownership or the letters after the dot in the filename? Because the latter doesn't have anything to do with permission.
You can change any permission as root. Are you root? Is the site on your computer or do you hire webspace?
You need to geive more detail please.
being (hopefully) more clear.
Thank you for responding. I apologize for being very confusing in my post. Let me try to answer your questions as accurately as possible and see where we go with it. I should not have said "extension." Here are two examples of the kind of files I am describing:
-rw-rw-rw- 1 httpd gbock 7494 Oct 1 23:41 which_way.txt
-rw-rw-r-- 1 gbock gbock 20 Jul 20 2005 welcome.txt
We rent space from quadrahosting. However the wiki we use does not use a database. It is linked to a forum that does use a data-base, and I suspect that may be part of the problem. When I want to change permissions I use remote access and cd to the files I need to modify. When I use chmod, the files that are listed to gbock, (who is root and also the only user) can be changed. But those listing httpd as the root owner cannot be changed. I cannot change the "which_way.txt" to -rw-rw-r-- for example.
The same program sometimes produces files with httpd listed as the root owner and ones that list gbock as the root owner. The method of creating the files seems the same -- though it is in different parts of the page.
permissions on a web server
OK, let's clear up the terminology:
root is the system administrator, that is not you. As root you can do anything, even change the owner and the permissions of the files that do not belong to root. You are user gbock. As that user you can only change the owner and the permissions of the files that belong to you, that is welcome.txt. You can not do so with which_way.txt.
which_way.txt was created by the webserver apache. It therefore belongs to him. You can try the following:
1. Ask the webspace provider to change the config, so that the instance of apache that runs your website to be run as user gbock. Then all files belong to you.
2. If there is a limited amount of files with filenames you know beforehand, you could create the files yourself ('touch filename'). You then must set the permissions, so that apache can write into these files.
As to why they are created differently, I cannot help you there.
Thanks
Thanks for the information, gromit. I had not thought of contacting the provider and asking that they change the way ownership of created files is handled. Did not know they could do that.