Rename folder -> create new folder equals contents of old folder

Discussion in 'General' started by BlueStream, Dec 3, 2006.

  1. BlueStream

    BlueStream New Member

    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.
     
  2. till

    till Super Moderator

    Did you rename the folder with FTP or with the mv command on the shell?
     
  3. BlueStream

    BlueStream New Member

    using FTP. this FTP has had no problems before.

    FlashFXP
     
  4. falko

    falko Super Moderator

    And does the domain name point to the correct IP address? You can check with
    Code:
    dig domain.com
     
  5. BlueStream

    BlueStream New Member

    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.
     
  6. falko

    falko Super Moderator

    What's the output of
    Code:
    ls -la /path/to/parentfolder
    and what's the name of the directory you're trying to rename?
     
  7. BlueStream

    BlueStream New Member

    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.
     
  8. till

    till Super Moderator

    Please connect with SSH. A free windows SSH client is putty.
     
  9. BlueStream

    BlueStream New Member

    After connecting succesfully, I immediately get a connection closed by host message. Both on accessing via IP and via the domain.
     
  10. falko

    falko Super Moderator

    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.
     
  11. BlueStream

    BlueStream New Member

    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:

    Code:
    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
     
  12. falko

    falko Super Moderator

    And what's the name of the directory you're trying to rename?
     
  13. BlueStream

    BlueStream New Member

    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..
     
  14. falko

    falko Super Moderator

    I need the contents of the parent directory of wiki:
    Code:
    ls -la /path/to/parentfolder
     
  15. BlueStream

    BlueStream New Member

    Code:
    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..
     
  16. falko

    falko Super Moderator

    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?
     
  17. BlueStream

    BlueStream New Member

    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.
     
  18. falko

    falko Super Moderator

    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
    Code:
    ls -la ...
    here again.
     
  19. BlueStream

    BlueStream New Member

    Test performed solely on folders.

    1) Create A

    2) Create A/B
    Code:
    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
    Code:
    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)
    Code:
    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
    Code:
    RNFR B
    550 B: No such file or directory
    Rename Failure
    4.2) Unable to enter/delete A/B via FTP
    Code:
    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.
     
  20. falko

    falko Super Moderator

    That sounds really odd... :confused:
     

Share This Page