Simply give the user that's running the sendmail daemon write permission on the file
You can do this via "chmod".
-check your sendmail config and /etc/passwd to know which user sendmail runs under;
ls -l /etc/mail/sendmail.pid
To know the permissions on the file, who owns it, etc.
-change the permissions with chmod so that the user sendmail runs under is given write access (either
by owning the file or via the group permissions). Don't make the file just "rwxrwxrwx", since PID (process ID) files are used by the system to control services (eg start/stop/restart them). A corrupted PID can thus lead
to a broken service.
In general, it's a bad idea to make any system file "world-writable".
If you want more help, post the following:
-user sendmail runs under
-output of the ls -l command above