Accessing web folder using SSH?


#1

Hi.

Please bear with me because I’m sort of new to bash and ssh and web programming and all that.

I have an ssh account set up, but the problem I’m having is that the folder that contains all my web stuff seems hidden.

That is, if I connect to my web space using FTP, I see three folders:

mydomain.com
logs
Maildir

(note: mydomain.com is just a placeholder, but you get the idea)

However, when I connect using ssh, and I call the ls command from whichever directory I start in (my home directory, I presume), all I see is:

logs
Maildir

If I try to cd mydomain.com, it says:

-bash: cd: mydomain.com: No such file or directory

Now, like I said, I have no problem accessing that folder when connecting via FTP, but with ssh it’s just not there for some reason, and I can’t find it.

I tried to get my bearings, because typically the bash prompt will tell me what directory I’m in (for most systems I’ve used), but in this case, the prompt just says [apocalypes] all the time, so I have no idea.

So, I tried to cd … and then ls to sort of “get a view from above”, but when I ran the ls command, it told me that permission has been denied. Since I had no idea where I was, I had no choice but to cd ~.

Speaking of which, I tried typing:

cd ~/mydomain.com

and it told me:

-bash: cd: /home/shelluser/mydomain.com: No such file or directory

So I guess that answers the question of where my home dir is, but I still can’t seem to access that web folder.


#2

My first guess is that you’re logging in as two different users. In shell, try the ‘pwd’ command which will Print Working Directory.

For more insight, take a look inside the ‘logs’ directory. Whatever domains that user hosts will have log folders named after the domain.

-Scott