linux – Symbolic link not allowed or link target not accessible

linux – Symbolic link not allowed or link target not accessible

It turned out that the symlink itself needed to be owned by the same user as the original linked folder

chown -R username: linkname

That did the trick for me

You can check the rights with

 ls -la

Then it looks a little wierd to see all the files owned by the actual user, except for the symlink, which is owned by the original user.

Hope this helps others with a similar issue as well!

first of all I would recommend to include some details in your question. E.g. the permissions of dirs and files would be helpful, what distro etc.

My crystal ball analysis:
– You web-server (apache) runs as user www-data
– Your php runs a suexec user A / user b.
– The www-data user, cannot access the file, because the permission for www-data is not sufficient on the file or its parent dir (!).

You could do:

$ sudo -u www-data ls -lah /path/to/your/file

… to see, what your webserver users sees.

$ ls -lah  /path/to/your/file

… to check, what permissons are set to the file. (group/world readable?)

$ ls -dlah  /path/to/your

… to check the permissions on parent dir (need x flag for www-data),

HTH,
j.

linux – Symbolic link not allowed or link target not accessible

In a <Directory> block in the Apache config, or in an .htaccess file:

Options FollowSymLinks

Leave a Reply

Your email address will not be published.