Record sorting order is based on the Custom View settings and its sorting configurations. You can find the option by going to:
Portal Tables
Select a table
Custom Views section
Configure Sort for custom view.
The sorting option is also available for the portal user. Records can be re-sorted manually by the end user.