Cannot manipulate my files in Ubuntu 18.04
I am having major problems with my data partition which I have mounted at /home/data. Any time I try to download a file to any location within this folder I get a download failed error (with both Chrome and Firefox). If I try to delete files using the File Explorer, it will show them as getting deleted (the files will disappear from the folder) but when I leave and re-enter the folder the files are still there.
In the beginning I was getting errors that files were 'Read-only'. So I tried to remount the partition using
sudo mount -o remount,rw /partition/identifier /mount/point
This seemed to solve the read-only issue, but it didn't fix the downloading/deleting/moving files issues.
When I run ls -la
from the /home
folder, it shows
drwxr-xr-x 5 root root 4096 Jan 10 16:45 .
drwxr-xr-x 26 root root 4096 Apr 16 13:01 ..
drwxrwxrwx 1 root root 8192 Apr 26 23:16 data
drwx------ 2 root root 16384 Jan 9 19:42 lost+found
drwxr-xr-x 34 steve steve 4096 Apr 29 14:50 steve
Which leads me to believe that I still don't have ownership over the folder, so I tried to get ownership using sudo chown steve:steve -vR data/
which gave me the following output for each file located in data
changed ownership of 'data/' from root:root to steve:steve
But the problem persists and the output of ls -la
remains as:
total 36
drwxr-xr-x 5 root root 4096 Jan 10 16:45 .
drwxr-xr-x 26 root root 4096 Apr 16 13:01 ..
drwxrwxrwx 1 root root 8192 Apr 26 23:16 data
drwx------ 2 root root 16384 Jan 9 19:42 lost+found
drwxr-xr-x 34 steve steve 4096 Apr 29 14:50 steve
I also tried chmod 777 ./data
but this also hasn't helped. At this point I don't know what else to do.
Some extra info, I am using Ubuntu 18.04 on a dual boot with Windows. The computer was fine this morning but in the afternoon sometime is when it broke down, but I don't remember doing anything out of the ordinary.
After trying to remount the partition in the recommended location from the comments I came across a new set of errors which led me to the eventual solution.
I had to run this series of commands
sudo ntfsfix /dev/sda1
sudo umount /dev/sda1
sudo mount -o rw /dev/sda1 /home/data
Now I have full r+w access again. The key here was the sudo ntfsfix /dev/sda1
command, as I guess the problem came from a windows restart or hibernation file that was present in the partition, and this command fixed that for me.