Cannot save any kind of file

9,866

Solution 1

Probably the permissions or ownership of files and directories in your home directory got messed up.

To fix ownership by giving it back to your current user for all files in your home directory, you can run this command in a terminal (will ask for your admin password):

sudo chown -R $USER: ~

If the problem is not ownership but permissions, you should provide the output of ls -l ~ so that we can see the file/directory listing of your home directory and check what permissions are likely wrong. Simply resetting all permissions to a new value would not be good here.

Solution 2

I had this same problem in Ubuntu 18.04 LTS. Like Abhishek yadav above, I reset the permissions for /tmp.

In a terminal window enter:

sudo chmod a=rwx,o+t /tmp
Share:
9,866

Related videos on Youtube

Abhishek yadav
Author by

Abhishek yadav

Updated on September 18, 2022

Comments

  • Abhishek yadav
    Abhishek yadav over 1 year

    I am unable to save any file in Ubuntu. When I download any file using Firefox this dialog appears

    could not be saved, because you cannot change the contents of that folder.Change the folder properties and try again, or try saving in a different location

    and when I save any file from LibreOffice it shows

    Error saving the document Untitled2: /home/user/Desktop/Untitled 2.odt does not exist. Error saving the document Untitled2: Write Error. The file could not be written.

    I have even tried many locations but unable to save anything.

    • Byte Commander
      Byte Commander over 7 years
      Could you please edit your question and add the output of the terminal command ls -l ~?
  • Satya Prakash
    Satya Prakash about 5 years
    I recently upgraded to 18.04. I can't save any file from browsers. Chrome and FF. Also, from libre office. From gEdit, I can create file and save. After upgrade, I tried in fstab. And due to error, I need to issue command to make RW to fstab file from emergency mode. Please, help.
  • Greenonline
    Greenonline about 3 years
    This doesn't seem to add much to the previous fsck answer.
  • matigo
    matigo about 2 years
    Something tells me that LibreOffice doesn't use Firefox's temporary directory for storage 🤔
  • Zanna
    Zanna about 2 years
    @matigo indeed, I guess there are further permission issues in Vercingatorix's home directory that need to be sorted out. I have no such directory but surely no directory should have 6 permission for any user. I suspect it should be 700. I wonder how this situation might have arisen...
  • Vercingatorix
    Vercingatorix about 2 years
    @matigo The OP mentioned Firefox problems, in addition to LibreOffice, and Google brought this up as a relevant hit for the Firefox error message I was getting. I guess technically my answer doesn't apply to the exact situation the OP proposed after all (my apologies), but someone searching for the same Firefox error might find my answer and find the solution useful.