Apache ownage

Yesterday I wanted to delete some files from the server.
Not huge files, not important files, but I do like a tidy bunch of directories. Opened up the ftp, went in, and I got ‘Operation denied’ errors. No matter what I did, nothing was going to let me delete those files and folders. Annoying.
Knowing that using the commandline is sometimes better as it affords more power, I used Putty to get into the directories in question. Checking there, it showed that all the images and files did not belong to me, they belonged to the server – Apache. It seems that when a php file creates another file, the ownership of this new file is assigned to apache. Now that’s all well and good, the files are safe and will work, but if you want them gone, you have to get apache to do it. Of course this just ain’t going to happen.
In #wordpress, Skippy took me through what I should do with the command line, but still no joy, and it was probably my fault getting some syntax wrong – but thanks for helping me Skippy ! The hosting forums for this domain had posts about this problem, but no solution save to suggest using a File Manager. So I go find myself one of those.
Install it – didn’t work. Try another – didn’t work. Try another – it wouldn’t install.
In the end, I stumbled across this php file manager at Sourceforge. A whopping download of about 10K. Unzipped it. Uploaded it. It deleted everything I wanted it to, and for those that it did not, my ftp then deleted them. Sorted !

Very nippy little tool to have, esp since programs like Gallery (which caused this initial problem) create such files. Mind, given it’s power, I’ve deleted it of my server. I reckon it only needs to be there when I want it to do something.

5 thoughts on “Apache ownage

  1. Hmm … it did one set of stuff yesterday totally fine.
    Found another dir I wanted rid of, and although altering permissions to 777, some stuff I could get rid of, others I cannot.
    With that php3 file, if it said no, sometimes the ftp would do it anyway.

    We need root permissions, and to use SSH.
    But I’ve not got that info …….. yet :wink:

  2. I have not got a CLUE what your talking about in particular, but I guess from the words root and the mode 777 you’re using a Unix based opsys. If so, you might find that you have some hidden file in the directory (prefixed by a “.” (eg .profile .fmc.xbasic)). These files don’t appear unless you specify to see them in the view files command (I usually use “ls -al .*” to see them.) but their existence prevents deletion of a directory.

    Hope this helps !

Comments are closed.