[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Unexpected permission denied



On Wed, Jan 25, 2023 at 2:34 AM <tomas@tuxteam.de> wrote:
>
> On Wed, Jan 25, 2023 at 02:51:05PM +0800, jeremy ardley wrote:
>
> [...]
>
> >      0.000041 lstat("/var/www/grammartiste.com/web/vendor/autoload.php", 0x7fffdc580970) = -1 EACCES (Permission denied)
> >      0.000034 lstat("/var/www/grammartiste.com/web/vendor/autoload.php", 0x7fffdc57f900) = -1 EACCES (Permission denied)
>
> Quoting the lstat(2) man page:
>
>        These  functions  return  information  about a file, in the
>        buffer pointed to by statbuf.  No permissions are required
>        on the file itself, but—in the case of stat(), fstatat(),
>        and lstat()—execute (search) permission is required on all
>        of the directories in pathname that lead to the file.
>
> So first I'd check the whole path leading to the file for dir
> search (aka execute) permissions.
>
> > -rwxrwxrwx 1 www-data www-data 771 Jan 24 13:00 /var/www/grammartiste.com/web/vendor/autoload.php

And check permissions with `ls -AlZ` or equivalent. Selinux might be
hijacking the EACCES error code. (If selinux is enabled).

Jeff


Reply to: