Based on the permission given below others can also read the file. I am logged in as ec2-user but I have to use sudo to read the file. Since permission is given for everyone to read why does it still ask sudo.
[ec2-user@ip-172-31-53-76 ~]$ sudo ls -la /var/log/nginx/access.log -rw-rw-r-- 1 nginx root 22731 Sep 2 23:55 /var/log/nginx/access.log
permission of each of the folders
drwxr-xr-x 19 root root 269 Aug 26 00:52 var drwxr-xr-x 9 root root 4096 Sep 3 03:19 log drwxrwxr-- 2 nginx root 159 Sep 3 03:19 nginx
What would I have to do so that I can run
tail -n 10 /var/log/nginx/access.log without having to use