0

I'm developing on Ubuntu 10.04 with Python/Django.

I'm having a weird and very inconsistent problem over here.

It is even hard to explain, but here we go. I'm using PIL (a Python Module for working with images), suddenly I noticed that some times (only sometimes and I can not predict when and can not create this my self when trying) when I create the directories for the images I am getting the directories as alias and not as folder (using Mac so this is in the Finder) and I can not access those directories from the finder or the PyDev. But I can see them as directories when using SSH to access the server from the terminal.

In general it wouldn't have bothered me, but this is the first time I've see this problem and just need to know if any one has any idea what it is and how to solve it?

EDIT:

  1. server is Ubuntu 10.04
  2. client is Snow Leopard
  3. from client to server: a, terminal (iTerm) over ssh, Can see every thing same as always. b, finder with ExpanDrive mount over SFTP getting mostly ok but some of the folders created with PIL come out as Alias (in the Kind column) and i can not see the content (only in finder)
7
  • Example directory names? What filenames are inside the failing directories? What does ls -ldq@ say about the directories?
    – geekosaur
    Jun 27, 2011 at 1:04
  • ls -ldq ??? say nothing this a root directory, and i have 11 directories in the gallery directory and using the terminal i can see them all
    – Erez
    Jun 27, 2011 at 1:07
  • Yes, the terminal will show them all. The @ (which I take it you dropped) is actually the most important of those options, as it shows if there is any Finder metadata associated with it. The name of the directory and the names of things within are important because they can cause Finder to consider them to be bundles or other special entries; again, you didn't provide them, so there's no way for anyone to tell. (And you need to run that ls on the Mac, not on Ubuntu, since Ubuntu doesn't know about OS X metadata or the magic OS X uses to store it on non-HFS+.)
    – geekosaur
    Jun 27, 2011 at 1:11
  • sorry, when I tried with (and tried again now) i am getting ls: invalid option --'@'. I am running it on a snow leopard in iTerm terminal
    – Erez
    Jun 27, 2011 at 1:29
  • Sorry about the examples, the directories are galleries -> 1 to 11 -> incide there are files, mid directory and thumbs directory with files... but as i said, i did some tests and i have the same files in two directories, one is ok and the other is not....that is the wierd part.... 10x :-)
    – Erez
    Jun 27, 2011 at 1:33

1 Answer 1

0

This is almost certainly an artifact of how ExpanDrive presents the remote SFTP server as a local filesystem to Mac OS X. Either it intentionally represents new directories as aliases/symlinks when it first learns of them and before it can cache their contents locally, or it has a bug where it sometimes presents things wrong to Mac OS X.

To test this theory, the next time it happens, you need to inspect the directory structure 4 ways:

  1. Via ls -l (and perhaps other options, as geekosaur suggested) on the Ubuntu system. Sounds like you've already done this and seen that it looks right that way.
  2. Via another SFTP client, in case Ubuntu's SFTP server is what's screwing up.
  3. Via ls -l (and perhaps other options, as geekosaur suggested) on the Mac. This is like getting a "second opinion" on what ExpanDrive is telling the Finder, in case this is a Finder bug instead of an ExpanDrive feature/bug. I'm talking about running ls right on the Mac itself, NOT while SSH'd into the Ubuntu system. Find where ExpanDrive is "mounting" the remote SFTP server (probably somewhere under /Volumes on Mac OS X), and navigate your way through there to the particular folder where PIL is putting the images, and do an ls -l of that.
  4. In the Finder on the Mac. Actually you'll have already inspected it this way when you notice the problem happening.

You need to find a way to answer the question of at which layer -- in which piece of software -- is this misrepresentation occurring. Is it on the Ubuntu filesystem? Sounds like it's not. Is it Ubuntu's SFTP server? Maybe. Is it ExpanDrive? Maybe. Is it Finder? Maybe.

1
  • Mark, Sorry for the hard and extra work I created for you :-)
    – Erez
    Jun 27, 2011 at 14:23

You must log in to answer this question.

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