I have FTP access to an Apache server on linux to upload files so that they can be downloadable from the web.

I recently was granted SSH access for extra permissions and figured that it would be quicker to download the files directly to the server, instead of downloading them to my machine then FTPing to the server.

When I downloaded a file using SSH to the server, and then placed it in the public_html directory, it was not visible from the web. The permissions (from SSH and the FTP client) were the same as all the other files that are visible, but it was not visible in the directory listing, and if I tried to type in the filename into my browser I would get a 403 error.

Obviously, when I FTP a file to the server something else happens that makes it web visible, that I am not currently privy to.

What am I missing that is causing the file to be invisible from the web? How can I fix it?

4 Answers 4


Possible causes:

  • umask issues (Unix file permissions)
  • selinux context
  • extended ACLs
  • As I am not a linux expert can you perhaps elaborate on how to check these things? Thanks Commented May 14, 2010 at 1:19
  • Post an 'ls -l' of the directory for us.
    – Brad
    Commented May 14, 2010 at 2:04

You connected via SSH with an account, may it be root or any other, rights on the file may prevent www-data (Apache) from accessing to the file you uploaded. So you can do a chown www-data:www-data yourfile to let them be accessible to Apache (be sure the directory which contains them is accessible to Apache to)

  • This assumes apache running as www-data; and also the OP already stated that permissions are the same (so ok maybe ownership not the same, but that should be checked and only then chown)
    – Unreason
    Commented Sep 27, 2010 at 15:48

SSH into the server and cd into the folder. Then do:
ls -al
This will show ownership and permissions for all files in that directory. Paste the output here (we just need to see the entry for the invisible file and a comparable entry for a visible file)


I transfer some files from server#1 to server#2. Now I want to transfer them from server#2 to server#1 First I move files to an account that is accessible from web (username: usr1) mkdir /home/usr1/public_html/publicFiles mv /*.tar /home/usr1/public_html/publicFiles

then: cd /home/usr1/public_html/publicFiles chown usr1:usr1 *.tar chmod 0644 *.tar

ls -l output: -rw-r--r-- 1 usr1 usr1 22375680000 Sep 20 04:37 file1.tar -rw-r--r-- 1 usr1 usr1 28196495360 Sep 20 17:51 file2.tar -rw-r--r-- 1 usr1 usr1 598691840 Sep 22 04:45 file3.tar

then I opened FF and entered SiteName.com/publicFiles output:

Index of /publicFiles

Icon Name Last modified Size Description[DIR] Parent Directory -
[ ] file3.tar 22-Sep-2010 04:45 571M

Only file3 is showed! I can not access file2 and file3 even with direct link! Error 403 occurred!

Please note that File3 is 571 MB and file1 & file2 is larger than 25 GB I think reason is the file size

You must log in to answer this question.

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