Wednesday, September 21, 2011

Err: Symbolic link doesn't shows or lists the files from given path in Apache

Error:
          No files are listed/shown in browser from the path given as symbolic link in Apache.

Reasons:
  1. The remote file path may not contains minimum permission required to list the contents.
  2. .htaccess file may not allows the server to list the contents for security purpose.
Solution:
     For reason 1,
           Make sure the permission given to the remote file path to be displayed. Minimum required permission to display (indexing) files on a path is (read, execute) for internet users (otherwise its called as others in Linux systems). This also should be given from the root upto the path you mentioned.
           For example, if you want to list the files from the path '/home/user/Desktop', the permission for each folder in a given path should contains minimum of (read, execute) like,
           /home  (r-x)
                    |_user  (r-x)
                            |_Desktop (r-x)

            Other wise none will be displayed even if you gave 777 to owner and group.


     For reason 2,
           For security purposes, System administrator may wrote this .htaccess file inside the folder they want. Some time this also caused the problem we faced. If it is, remove or comment the following line in the file located on our remote folder path,

           deny from all

            or else remove it it is not required. Make sure importance of  the file on that path before remove.

            If it is required then restart the Apache server once or give 'force-reload' to take effect.


Note: This is tested under Ubuntu 11.04. In Windows systems, you have use 'Security tab' from the folder properties of the remote path to change the user permission.


No comments:

Post a Comment