Why can't I see .htaccess files in Leopard?

Discussion in 'macOS' started by z400central, Sep 28, 2008.

  1. z400central macrumors regular

    Joined:
    Nov 8, 2006
    #1
    Hi Guys,

    I need to edit a .htaccess file for my website, but I can't see the files in Leopard. What's up with that? And how can I fix it?

    Something so simple....Weird! :confused:

    Thanks!
     
  2. Buttercookie macrumors member

    Joined:
    Jun 2, 2007
    #2
    I think OSX uses the dot to hide files. Maybe someone else has a better answer
     
  3. mathcolo macrumors 6502a

    Joined:
    Sep 14, 2008
    Location:
    Massachusetts
    #3
    Yes. That's true. The .htaccess file is hidden because it starts with a dot and Mac OS X hides files with a dot. You can use a utility like xMod to show hidden files and edit the file.
     
  4. mangaa macrumors newbie

    Joined:
    Dec 5, 2009
    #4
    Hello Math, looks like you may know a bit more than I do. I live in Denver too, damn cold :p glad the snow stopped.

    Well, so how do you see .htaccess file on mac? I use CyberDuck as my FTP client, and even CyberDuck is not able to see .htaccess file on my server. I used xMod.app and checked see hidden files, but no go...

    Any other suggestions?
     
  5. bobr1952 macrumors 68020

    bobr1952

    Joined:
    Jan 21, 2008
    Location:
    Melbourne, FL
    #5
    I used to use Cyber Duck but it stopped working after one of the updates so I switched to Fetch--and it does not hide dot files.
     
  6. Darth.Titan macrumors 68030

    Darth.Titan

    Joined:
    Oct 31, 2007
    Location:
    Austin, TX
    #6
    Apparently it's a glitch in Cyberduck having to do with some servers not displaying hidden files when using the STAT command. A workaround is to open Terminal and enter:
    Code:
    defaults write ch.sudo.cyberduck ftp.sendStatListCommand false
    Worked for me.
     
  7. soamz macrumors 6502a

    Joined:
    Jun 20, 2010
    Location:
    Orissa, India
    #7
    Damn frustrating..
    I also tried from Terminal and reached my dir and did
    rm .htaccess

    But no good.

    It didnt even show the .htaccess when I did ls for that directory.

    Dman, another MAC limitation.
     
  8. Nermal Moderator

    Nermal

    Staff Member

    Joined:
    Dec 7, 2002
    Location:
    New Zealand
    #8
    You'll need to use something like "ls -a" to show hidden files. It's not a Mac limitation per se; Unix hides files beginning with a dot.
     
  9. ChrisA macrumors G4

    Joined:
    Jan 5, 2006
    Location:
    Redondo Beach, California
    #9
    All Unix systems, not just Mac OS X by default don't show files that start with a dot. It's been that

    way the at least 30 years.

    It you are using the terminal and want to list files use the -a switch. Remember "a" is for "all". So "ls -a" will show you all the files.

    This is the reason for the dot in htaccess so it will not be listed in directory listings by the browser.

    You can always simply type in the filename
     
  10. simplydru macrumors newbie

    Joined:
    Nov 27, 2005
    #10
    I use cyberduck. In the file browser window towards the top right there is a search field. Type "." in there and your .htaccess file should pop up.

    You can either edit it straight away or back it up on your mac. If you want to back it up you'll need to rename it with something before the dot. When you upload it again, change the name back to .htaccess after you've uploaded it to your webserver.

    Hope that works for you.
     

Share This Page