sftp “remote open failure”

I sftp’ed into my linux server from my macbook. I have never had issues transferring files through sftp until now.

I am getting the following error when I try to put something on my linux server

sftp> put test.cpp
Uploading test.cpp to /home/mylin/test.cpp
remote open("/home/mylin/test.cpp"): Failure

When I try to get something, it works. Any suggestions?