How to hide root folders on when using FTP?

Does anyone know how to hide the root+system folders on ftp?

Basically I would like to hide the root+system folders except the public folder. So when I sign in I will see the public directory only.

10 Replies

If you have logged in with a user who has the root access. you will be able to browse through everything.

The following should do the trick: http://library.linode.com/security/sftp-jails

@hoopycat:

The following should do the trick: http://library.linode.com/security/sftp-jails

I was looking for a simpler solution, like tick box somewhere to hide/unhide files/folders. (just think about view>hidden file option on your linux/windows computer)

So that you don't see them, or so that other users can neither see nor access them?

The first would be a function of your client. You might be able to set up your client to plop you straight into the directory you want to be in.

@hoopycat:

So that you don't see them, or so that other users can neither see nor access them?

The first would be a function of your client. You might be able to set up your client to plop you straight into the directory you want to be in.

Yap I will do this if I don't find any "hide folders" option on the server.

The reason I would like to do this is:

1. I have a history of dragging folders to another accidentally while using ftp.

2. Will save time to go straight to the public folder.

3. Yet - if I want to have a look what's happening on the root folders I will just "unhide" and investigate

@minerva:

Basically I would like to hide the root+system folders except the public folder. So when I sign in I will see the public directory only.
I think you'll need to create a separate account and restrict folder permissions accordingly so that account won't have read access to root/system, but will have all of the access you wish to the public folder.

However, if you just want to avoid certain folders, I think changing the default directory of the client is a reasonable solution.

@yaz:

I think you'll need to create a separate account and restrict folder permissions accordingly so that account won't have read access to root/system, but will have all of the access you wish to the public folder.

So I will just make a new "xyz" user and he will only have access to the "public_html" folder.

If there is anything require to investigate the root will login using ftp and have a look, right? quite like this idea.

I know how to make a new user but what is the command to restrict the new user's accessibility except the public_html?

@minerva:

2. Will save time to go straight to the public folder.
Pretty much ANY FTP Client will have a "default folder" setting to allow you to set what the remote folder is when connected.

And you should NOT be using FTP at all, it's highly insecure, you should be using SFTP, which is a subset of SSH.

@minerva:

I know how to make a new user but what is the command to restrict the new user's accessibility except the public_html?

http://library.linode.com/security/sftp-jails

I do assume that, by FTP, you meant SFTP. (This should be a very safe assumption, since it is 2012, but you never know…)

@hoopycat:

I do assume that, by FTP, you meant SFTP. (This should be a very safe assumption, since it is 2012, but you never know…)

Thanks for the link hoopy. Much appreciated.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct