chmod having no results in specific folder

0

0

I was playing around with setfacl and now I can't access /var/www unless I use sudo. When I try to go to my webserver I get a 403 error.

user@computer:~$ ls -l /var/www
ls: cannot access '/var/www/{removed}': Permission denied
ls: cannot access '/var/www/html': Permission denied
total 0
d????????? ? ? ? ?            ? html
d????????? ? ? ? ?            ? {removed}

When I use sudo:

user@computer:~$ sudo ls -l /var/www
total 8
drwsr-sr-x+ 2 root root 4096 Oct 23 19:19 html
drwsr-sr-x+ 2 root root 4096 Oct 24 08:44 {removed}

I tried sudo chmod -R 755 /var/www. I don't get any errors, but there is no change.

How can I get the permissions correct? Thank you!

Update

I just happened to reload the page (from the server) and it's not showing the 403 error any more, it loads the page correctly. ls still gives the same results and I still can't access anything in /var/www without sudo.

DCowan

Posted 2019-10-24T14:55:56.057

Reputation: 15

I would also try a chown -R user:group /var/www/ Operating System Command and then try again. – None – 2019-10-24T16:43:26.483

How to remove ACL from a directory and back to usual access control? – Kamil Maciorowski – 2019-10-24T20:36:38.237

Thanks. I didn't really have anything in there that I needed to keep. I just deleted /var/www and recreated it. – DCowan – 2019-10-27T17:38:11.487

No answers