Forums

Permission denied

Hi i want to send a video by Telegram bot. Code is : video = os.system(r'/home/user/folder/video.mp4')

when i run it This error Shows : sh: 1: '/home/user/folder/video.mp4: Permission denied

Please Help me.

What os.system(r'/home/user/folder/video.mp4') is supposed to do? Have a look at the os.system documentation.

Look it should open video.mp4, i replaced this : video = open('/home/user/folder/video.mp4', 'rb')

and again this error : Permission denied (/user is my Host's username in here)

btw i run both of them in my PC and worked but in this Host it doesn't work

Is your local PC Windows machine? Is it possible that your file has capital letters and code is all lowercase? Linux paths are case sensitive, and Windows ones are not.