Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Symlink "Permission denied"

Tags:

linux

symlink

I am unable to find any existing questions addressing this:

I have a symlink:

lrwxrwxrwx  1 www  adm    49 Aug 26 10:00 pictures -> /home/user/foo/bar/baz

Target directory:

drwxr-xr-x 12 www adm 4096 Aug 26 07:53 baz

Trying to access it as user www fails:

~$ sudo -u www ls /var/www/pictures
ls: cannot access /var/www/pictures: Permission denied

What on earth?

EDIT: Turns out the problem was missing permissions on outer folders.

like image 826
Dennis Thrysøe Avatar asked Oct 27 '25 05:10

Dennis Thrysøe


1 Answers

User www simply does not have access to /home/user/foo/bar/baz.

Check this and add proper access rights to this directory.

like image 104
Michał Walenciak Avatar answered Oct 28 '25 18:10

Michał Walenciak



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!