5

I have a small set of files and folders in a directory on my computer that are causing issue. When I upload them to my web host (Dreamhost) via SFTP (using Transmit on OSX, a GUI), most files and folders transfer as expected. But a couple of them convert to uppercase on the web host. Example: slider.js becomes SLIDER.JS

Permissions
644 slider.js on my local machine
644 SLIDER.JS on web host

I'm not sure where to start in debugging this issue so if any more information is needed, please ask.

Update 11/30/11 5pm EST
- I was able to solve the issue by simply renaming the file slider.js to slider2.js and then back to slider.js. I am still interested to figure out what was causing this issue.
- Using sftp on the commandline transferred the problem files without uppercasing.
- I have a MAC running OSX 10.7.2. Don't know too many details about the filesystem but information is available on the [Ars Technica review of OSX 10.7][1].

In my further investigation I found that ftp recognizes a case command. Details follow:

Toggle remote computer file name case mapping during mget commands. When case is on (default is off), remote computer file names with all letters in upper case are written in the local directory with the letters mapped to lower case.

Could it be that the [Transmit ftp app][1] is incorrectly utilizing this command? This is speculation.

5
  • Is there a pattern?
    – soandos
    Nov 30, 2011 at 19:11
  • What file system are you using locally to store these files?
    – Daniel Beck
    Nov 30, 2011 at 19:14
  • Does the same thing happen when you use the command line sftp program? sftp user@host, then put /path/to/local/slider.js /remote/path/for/uploaded/slider.js, then quit.
    – Daniel Beck
    Nov 30, 2011 at 19:16
  • If you enable SSH (Remote Login) in Sharing preference pane in System Preferences and connect to localhost using your account name and password, and upload from your local system to your local system, does the same thing happen?
    – Daniel Beck
    Nov 30, 2011 at 19:17
  • Thanks for the comments so far. I've added some info to the original question. Nov 30, 2011 at 22:17

1 Answer 1

1

I assume your filesystem is HFS+ (given you are using Transmit on OSX). HFS+ has 2 flavors, one is case sensitive, and the other is case insensitive (https://apple.stackexchange.com/questions/71357/how-to-check-if-my-hd-is-case-sensitive-or-not). However both are case preserving (http://en.wikipedia.org/wiki/Case_preservation). The default flavor of HFS+ is case insensitive. You can change it, but it might break some apps, so I don't recommend it.

What that means in your situation, is that the file is created as "SLIDER.JS" in your filesystem. You can open it as "slider.js", "Slider.js", and any other variations of it's case. However, when you send it using your app, it likely uses the canonical version of it (case preserving).

As you mentioned, renaming it (I assume from Finder), to "slider2.js", and back to "slider.js", ensures that the preserved case is now all lowercase.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .