what are the file permissions need for a file hosted on linux server?

Solution: 1

The script must at least have owner read and execute permission. Here the scripts are set to 755 (only the owner of the script has read, write, and execute privileges; other users and groups only have read and execute permissions).

Be aware that you set the owner of the files to the apache user (usually apache or www-data or something like that).

Solution: 2

In shell type :

chown apache:apache filename

or

chown root:root filename , it depends what is your superadmin username

after :

chmod 0755 filename