How to tell which FTP directory I am in?

1

I received FTP credentials from my client to start developing a website I am working on for them, but I'm not sure what directory they gave me access to.

It just shows "/" on the top of Transmit for Mac OS X Yosemite. I only have TLS access, no SFTP/SSH.

It's definitely not the main directory because the main site is still running and all I see is the ftp_quota file.

I don't really want to bother the client if I don't absolutely have to.

Adam Thompson

Posted 2015-12-16T02:06:31.583

Reputation: 111

Answers

3

Most ftp (and sftp) clients have a pwd command which you can run. However, if your connection shows "/", that would be the same result as the pwd command.

You are probably connected to a server running in a chroot, which uses as its "/" some other directory, and the ftp server cannot tell you what that is.

Further reading:

Thomas Dickey

Posted 2015-12-16T02:06:31.583

Reputation: 6 891

2

Your account is chrooted. That means it's explicitly configured not to allow you to see the physical path where the account home directory is located.

For details, see for example Wikipedia chroot article:

A chroot on Unix operating systems is an operation that changes the apparent root directory for the current running process and its children. A program that is run in such a modified environment cannot name (and therefore normally cannot access) files outside the designated directory tree.

So you cannot find out yourself.

Martin Prikryl

Posted 2015-12-16T02:06:31.583

Reputation: 13 764