folder on a cgi server not empty when it looks empty?

User avatar
stuck
Panoramic Lounger
Posts: 8171
Joined: 25 Jan 2010, 09:09
Location: retirement

folder on a cgi server not empty when it looks empty?

Post by stuck »

If my FTP client tells me that it can't delete a folder on a CGI server because it's not empty yet when I look in the folder I can't see anything then I guess that implies the folder must contain hidden files, so how would I unhide them?

I can't login to the shell, my ISP doesn't allow that, so any file permission changes have to be done via a cgi script run from a browser.

Ken
PS full story goes like this:
I can activate a CGI server and MySQL db on the free webspace provided to me by my ISP. Out of curiosity I did that and then tried to follow a tutorial about installing a photo gallery app.

First problem I encountered was that the tutorial was, way, out of date. It said use telnet to login to the shell to set file permissions but all I got was an error. A bit of searching told me direct login to the shell had been disabled by my ISP but if I copied and pasted a magic script into a text file and uploaded that with a .cgi extension and set the correct permissions on that one file via my FTP client, then the script would work its magic on the myriad of files that make up the gallery app when I opened the cgi file in FF. Sure enough, it did all that.

Next problem was when I ran the gallery installer, it objected to the fact I only had MySQL 4, it needed v5. Another search showed that my ISP is unlikely to provide MySQL v5 anytime soon if ever. OK thinks I, I was only curious, I'll abandon this version of the gallery and try the previous version, that can cope with MySQL 4.

In my FTP client I selected the top level folder holding all the gallery files and hit delete. Everything seemed to disappear except the top level folder. Initially the error was "550, not a plain folder". A Google search suggested using binary mode rather than ASCII mode. I found the relevant tick box in my FTP client and reconnected in binary mode. The folder still wouldn't delete but now the error was "folder is not empty". Which is where this post starts.

I have actually fixed the problem by taking the drastic route of deactivating the CGI option on my webspace. In this case that was not a problem. I had nothing on the CGI server except the failed gallery install so I didn't loose anything but I'm still curious to learn how to fix this issue properly.

User avatar
stuck
Panoramic Lounger
Posts: 8171
Joined: 25 Jan 2010, 09:09
Location: retirement

Re: folder on a cgi server not empty when it looks empty?

Post by stuck »

I think I've found what I need to do if/when I come up against this again. I need to tick the 'advanced directory listing mode' box within my FTP client in order to see hidden files.

Ken

User avatar
Leif
Administrator
Posts: 7209
Joined: 15 Jan 2010, 22:52
Location: Middle of England

Re: folder on a cgi server not empty when it looks empty?

Post by Leif »

Thanks for posting back!
Leif

User avatar
stuck
Panoramic Lounger
Posts: 8171
Joined: 25 Jan 2010, 09:09
Location: retirement

Re: folder on a cgi server not empty when it looks empty?

Post by stuck »

That's OK, I'm just enjoying that probably for the one and only time ever, it looks like I'm the only one that seems knows the answer to a question posted in The Lounge :grin:

Ken