Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want the users who log in to the web-server via FTP to don't be able to see the files in the root-folder, but all folders and all files in subfolders. This is not for security, only to have a cleaner view.

But I can't find any way to hide the files.

I know it is possible to give the user access only to a certain subfolder, but the users need to see all the folder in the root-folder, so this is't really an option.

It would be OK if there is a way to hide only all .php files.

If the solution require a FTP-program, it should work on both Windows and OS X.

share|improve this question
Can you move all the folders of the root dir to a subfolder, then give the users access to that? – RJFalconer Jan 24 '10 at 12:20
No, I can't move the folders to a subfolder, thats my big problem. – Johan Jan 24 '10 at 12:24

First you sound a bit confused. You cannot login to a webserver using a ftp client. You access a webserver using a webbrowser.

If you want to remove files from the default listing of files that a webserver will produce if there isn't an index file, then perhaps the easiest way is to write a cgi program which will exclude those files you don't want to see, and output the names properly formatted.

share|improve this answer
If I wasn't confused I should not asked the question. And I'm not an expert. So I'm sorry if you did not understand my question. Anyway, the users use a FTP-program to see files and transfer files to the server. Is you answer still applicable? – Johan Jan 25 '10 at 8:18

You can mark the files as hidden by prefixing the "." character to their filenames.

share|improve this answer
I'm not sure of what you mean. But it's not an option to change the name of any file or folder. – Johan Jan 24 '10 at 12:26
Same with filenames on a Linux, Mac, ... OS: all files starting with a "." are hidden: Example: ".test.html" (will not be shown by ls command) – road242 Jan 24 '10 at 17:02

I think what you are describing cannot be achieved on the server. The closest thing you can do with file permissions is hide a non-root directory (and its contents).

However you should be able to filter the view on any decent FTP client.


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.