stat -c "%a %n" /path/to/folder/or/file
$ stat -c "%a %n" nginx.conf
644 nginx.conf
namei -om /path/to/folder/or/file
$ namei -om /etc/nginx/nginx.conf
f: /etc/nginx/nginx.conf
drwxr-xr-x root root /
drwxr-xr-x root root etc
drwxr-xr-x root root nginx
-rw-r--r-- root root nginx.conf