Assuming you haven’t done something to the server folder permissions that prohibits a write to user: melon you might want to add yet another option to your growing list: nounix.
Code:
//192.168.0.40/webserver /media/webserver cifs credentials=/root/.smbcredentials,sec=ntlmv2,iocharset=utf8,file_mode=0777,dir_mode=0777,uid=1000,gid=1000,nounix 0 0