Strange Postgresql behaviour on start

Centos 8.3, postgresql 12 (i tried even 10, same thing). I have set the permission of the data directory as postgres:postgres. if i start the service from systemctl, it gives me “creation of lock file “postmaster.pid” failed: Permission denied”. if i copy the command from postgresql.service (postmaster -D /data/pgdata) and i run from the console as postgres user, it works, and the postmaster.pid is correctly created. I have no ideas, because it’s not a permission problem…

thank you in advance