Cant execute python commands via webserver

hii
i have osmc
i installed php sql aphace and python
i can run python files and commands via putty
but if i’m running the files from web i create /www/html/index.php , it doesn’t work
(i change to promotions to the folder and files )

sudo chown -R osmc /var/www
sudo find /var/www -type f -exec chmod 666 {} ;
sudo find /var/www -type d -exec chmod 755 {} ;

why it doesn’t workkk ?? ?

fixed it
i add www-data privlages