If you did a default install then you will need to change the ownership of all the files in alf_data to the user you want to run Alfresco under. With this done, sign in as that use and it should start up OK using alfresco.sh
You will need to change the "run as" user in your init script (if you use one) to make sure that Alfresco starts up under the correct user on a machine re-boot.
If you did a non default install then your data may be in different folders but the requirement remains that same.
>If you did a default install then you will need to change the ownership of all the >files in alf_data to the user you want to run Alfresco under. Should i change the ownership of all the files in only 'alf_data'? What about in 'alf_data/postgresql'?
I think postgresql run as postgres. Should i change all?
And what about other file? like ALF_HOME/postgresql and so on.
Yes. Change ownership of everything in alf_data and all sub directories.
Also, thinking about it, change the ownership on the logs and the log directories {alfresco}/tomcat/logs and the files in that and (usually) /var/log/alfresco and the files in that