If you have to rotate the rpi 7" display to portrait (270°) you have to use two things:
1. edit the config.txt and put in display_rotate=3
2. rotate the Touchscreen with
sudo DISPLAY=:0 xinput --set-prop 'FT5406 memory based driver' 'Coordinate Transformation Matrix' 0 -1 1 1 0 0 0 0 1
from a SSH console. Without ssh its
sudo xinput --set-prop 'FT5406 memory based driver' 'Coordinate Transformation Matrix' 0 -1 1 1 0 0 0 0 1
im not familar with unix. For Point 2 you have to made a sript to apply it on boot.
Perhaps somebody could make the configuration from the UI?