View Full Version : Rename folder -> create new folder equals contents of old folder
BlueStream
3rd December 2006, 13:41
Ok. I followed the perfect setup for Fedora Core 5.
When accessing the site via IP, renaming a folder to something else, and then recreating a new folder with the same name, will result in the new folder holding the contents of the old directory. Whether it is a symlink or a true copy I am not sure and have no time to explore.
I was originally gonna post a "aw crap! why me!" thread but as indicated above, logging in via the actual domain does not cause the same problems.
till
4th December 2006, 11:02
Did you rename the folder with FTP or with the mv command on the shell?
BlueStream
4th December 2006, 14:58
using FTP. this FTP has had no problems before.
FlashFXP
falko
5th December 2006, 18:31
And does the domain name point to the correct IP address? You can check with
dig domain.com
BlueStream
5th December 2006, 18:37
I think you misunderstand.
FTPing to the IP will create the problem mentioned. FTPing to the domain which points to the IP will not.
In any case, the domain points to the IP.
falko
6th December 2006, 18:36
When accessing the site via IP, renaming a folder to something else, and then recreating a new folder with the same name, will result in the new folder holding the contents of the old directory. Whether it is a symlink or a true copy I am not sure and have no time to explore.
What's the output of ls -la /path/to/parentfolder
and what's the name of the directory you're trying to rename?
BlueStream
7th December 2006, 04:51
What's the output of ls -la /path/to/parentfolder
and what's the name of the directory you're trying to rename?
Hi. How do I do this? Thru the ftp? I'm using a GUI ftp.
Or should I access the server directly.
Sorry, completely lost here.
till
7th December 2006, 10:46
Please connect with SSH. A free windows SSH client is putty.
BlueStream
7th December 2006, 11:30
After connecting succesfully, I immediately get a connection closed by host message. Both on accessing via IP and via the domain.
falko
8th December 2006, 15:28
Did you connect as root? Maybe the user you tried doesn't have shell access.
Anyway, instead of SSH, you can use the system's terminal if you have physical access to the system.
BlueStream
9th December 2006, 07:22
I gave the user SSH access. It's the admin accoun for that web but it's not "root" account. So anyway...
ls -la via direct access is as follows:
total 356
drwxr-xr-x 14 admin web4 4096 Dec 3 20:30 .
drwxrwxr-x 9 admin web4 4096 Dec 9 13:21 ..
-rw-r--r-- 1 admin web4 825 Dec 3 20:11 AdminSettings.sample
-rw-r--r-- 1 admin web4 3198 Dec 3 20:11 api.php
drwxr-xr-x 2 admin web4 4096 Dec 3 20:12 bin
-rw-r--r-- 1 admin web4 17997 Dec 3 20:11 COPYING
drwxr-xr-x 4 admin web4 4096 Dec 3 20:12 docs
drwxr-xr-x 2 admin web4 4096 Dec 3 20:12 extensions
-rw-r--r-- 1 admin web4 162 Dec 3 20:11 FAQ
-rw-r--r-- 1 admin web4 159466 Dec 3 20:12 HISTORY
drwxrwxrwx 9 admin web4 4096 Dec 7 19:48 images
-rw-r--r-- 1 admin web4 1446 Dec 3 20:12 img_auth.php
drwxr-xr-x 7 admin web4 12288 Dec 3 19:48 includes
-rw-r--r-- 1 admin web4 1755 Dec 3 20:12 index.php
-rw-r--r-- 1 admin web4 3989 Dec 3 20:12 INSTALL
-rw-r--r-- 1 admin web4 3538 Dec 3 20:12 install-utils.inc
drwxr-xr-x 4 admin web4 4096 Dec 3 20:02 languages
drwxr-xr-x 2 admin web4 4096 Dec 3 20:02 locale
-rw-rw-rw- 1 apache apache 4790 Dec 7 18:49 LocalSettings.php
drwxr-xr-x 9 admin web4 4096 Dec 3 20:07 maintenance
drwxr-xr-x 2 admin web4 4096 Dec 3 20:07 math
-rw-r--r-- 1 admin web4 1348 Dec 3 20:12 opensearch_desc.php
-rw-r--r-- 1 admin web4 6173 Dec 3 20:12 profileinfo.php
-rw-r--r-- 1 admin web4 3535 Dec 3 20:12 README
-rw-r--r-- 1 admin web4 319 Dec 3 20:12 redirect.php
-rw-r--r-- 1 admin web4 91 Dec 3 20:12 redirect.phtml
-rw-r--r-- 1 admin web4 21177 Dec 3 20:12 RELEASE-NOTES
drwxr-xr-x 2 admin web4 4096 Dec 3 20:08 serialized
drwxr-xr-x 9 admin web4 4096 Dec 3 20:11 skins
-rw-r--r-- 1 admin web4 605 Dec 3 20:12 StartProfiler.php
drwxr-xr-x 2 admin web4 4096 Dec 3 20:11 tests
-rw-r--r-- 1 admin web4 2316 Dec 3 20:12 thumb.php
-rw-r--r-- 1 admin web4 1270 Dec 3 20:12 trackback.php
-rw-r--r-- 1 admin web4 12210 Dec 3 20:12 UPGRADE
-rw-r--r-- 1 admin web4 88 Dec 3 20:12 wiki.phtml
falko
10th December 2006, 14:52
And what's the name of the directory you're trying to rename?
BlueStream
10th December 2006, 21:23
The name of the directory wiki and I was trying to rename it to wiki.old and it is the parent directory of all those files you've seen earlier..
falko
11th December 2006, 15:46
The name of the directory wiki and I was trying to rename it to wiki.old and it is the parent directory of all those files you've seen earlier..
I need the contents of the parent directory of wiki:
ls -la /path/to/parentfolder
BlueStream
11th December 2006, 17:38
I need the contents of the parent directory of wiki:
ls -la /path/to/parentfolder
total 40
drwxrwxr-x 9 admin web4 4096 Dec 11 23:37 .
drwxr-xr-x 8 admin web4 4096 Dec 4 04:00 ..
drwxr-xr-x 2 root root 4096 Dec 3 17:06 error
-rw-rw-r-- 1 admin web4 1212 Dec 3 20:28 index.html
-rw-r--r-- 1 root root 0 Dec 11 23:37 ls.txt
drwxr-xr-x 2 admin web4 4096 Dec 4 04:00 stats
drwxr-xr-x 14 admin web4 4096 Dec 3 20:30 wiki
drwxr-xr-x 2 admin web4 4096 Dec 3 17:11 wikiasdf
drwxr-xr-x 16 admin web4 4096 Dec 3 17:05 wiki.disabled
drwxr-xr-x 15 admin web4 4096 Dec 3 17:25 wikif
drwxr-xr-x 2 admin web4 4096 Dec 3 17:10 wiki.sdfsd
the wiki* are renamed folders to test this occurence..
falko
12th December 2006, 15:31
How does this output change if you use an FTP client and try to rename the wiki directory
a) using an IP address to connect
b) using an FQDN?
BlueStream
12th December 2006, 18:19
How does this output change if you use an FTP client and try to rename the wiki directory
a) using an IP address to connect
b) using an FQDN?
I really don't know. If you want, I can give you access to the server to do all your tests and stuff.
Basically, I rename "wiki" to "wiki.old". "wiki.old" is a valid folder with valid contents. I create a new "wiki" and upon entering the folder I see all the old contents there. As previously mentioned, I did not check if it was a symlink or a copy.
Please PM if you want the details. Cheers.
falko
13th December 2006, 15:26
I really don't know.
Just do what you did at the beginning of the thread (trying to rename the folder with your FTP client) and then post the output of ls -la ... here again.
BlueStream
13th December 2006, 16:14
Test performed solely on folders.
1) Create A
2) Create A/B
total 28
drwxrwxr-x 7 fusionstream web3 4096 Dec 13 22:03 .
drwxr-xr-x 9 fusionstream web3 4096 Dec 13 19:52 ..
drwxr-xr-x 3 fusionstream web3 4096 Dec 13 22:03 A
drwxr-xr-x 2 fusionstream web3 4096 Dec 13 19:01 awstats
drwxrwxr-x 2 fusionstream web3 4096 Dec 1 13:21 error
-rw-rw-r-- 1 fusionstream web3 100 Dec 11 12:17 index.html
drwxr-xr-x 4 fusionstream web3 4096 Dec 10 23:32 mirror
drwxr-xr-x 2 fusionstream web3 4096 Dec 2 04:00 stats
3) Rename A to A.old
total 32
drwxrwxr-x 7 fusionstream web3 4096 Dec 13 22:04 .
drwxr-xr-x 9 fusionstream web3 4096 Dec 13 19:52 ..
drwxr-xr-x 3 fusionstream web3 4096 Dec 13 22:03 A.old
drwxr-xr-x 2 fusionstream web3 4096 Dec 13 19:01 awstats
drwxrwxr-x 2 fusionstream web3 4096 Dec 1 13:21 error
-rw-rw-r-- 1 fusionstream web3 100 Dec 11 12:17 index.html
drwxr-xr-x 4 fusionstream web3 4096 Dec 10 23:32 mirror
drwxr-xr-x 2 fusionstream web3 4096 Dec 2 04:00 stats
4) Create A (A contains B)
total 36
drwxrwxr-x 8 fusionstream web3 4096 Dec 13 22:04 .
drwxr-xr-x 9 fusionstream web3 4096 Dec 13 19:52 ..
drwxr-xr-x 2 fusionstream web3 4096 Dec 13 22:04 A
drwxr-xr-x 3 fusionstream web3 4096 Dec 13 22:03 A.old
drwxr-xr-x 2 fusionstream web3 4096 Dec 13 19:01 awstats
drwxrwxr-x 2 fusionstream web3 4096 Dec 1 13:21 error
-rw-rw-r-- 1 fusionstream web3 100 Dec 11 12:17 index.html
drwxr-xr-x 4 fusionstream web3 4096 Dec 10 23:32 mirror
drwxr-xr-x 2 fusionstream web3 4096 Dec 2 04:00 stats
4.1) A/B cannot be renamed via FTP
RNFR B
550 B: No such file or directory
Rename Failure
4.2) Unable to enter/delete A/B via FTP
CWD /web/A/B
550 /web/A/B: No such file or directory
PORT 192,168,1,99,12,142
4.3) Unable to enter A/B via HTTP
access via HTTP reveals 404 error while trying to access A/B
4.4) Refresh of A via FTP makes A/B disappear
4.5) #DIR of A does not reveal A/B
4.6) #DIR of A.old reveals A.old/B
Deletion of folder and recreation does not display this problem.
Connecting to the server's FQDN also "solves" this problem.
I'm beginning to think this has got more to do with proftpd.
falko
14th December 2006, 21:25
That sounds really odd... :confused:
BlueStream
15th December 2006, 04:32
That sounds really odd... :confused:
No kidding? That's what I said! LOL
Anyway, like I said. I believe it has something to do with proftpd. I dunnoe what it is yet but it seems like a bug.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.