The exact implementation of file permissions for a shared server will be dependent on your hosting provider. You should check with their support to identify the correct configuration.
You will want to know:
- What user and group you are using when manipulating files
- What user and group your webserver is using when serving files
- Whether other users/webservers on the same server share any of the above groups
These may be the same; may have overlap; or, they may be entirely different.