Ubuntu – Can’t save files to second hard drive

firefoxpartitioningpermissions

I just bought a new laptop with a 512GB SSD and a 1TB HDD. I installed Ubuntu on the SSD (using UEFI) and left the HDD for storage. I had Windows on it, but I deleted it. It had two recovery partitions left and an EFI partition. I assigned most of the left over space as an ext4 partition to use for data, with mountpoint /BHDD. I left 100GB as unallocated in case I decide to revive Windows). I created symbolic links to my Documents, Pictures, Downloads and Music folders in my home directory. However, I can't download files to them – I get an error "Invalid Save permissions". I can create and delete folders or text files on /BHDD.

I am really confused what is wrong.

Edit: Output from ls -l ~

total 28  
drwxr-xr-x 2 bogdan bogdan 4096 Aug 27 19:22 Desktop  
lrwxrwxrwx 1 bogdan bogdan   22 Aug 26 21:29 Documents -> /BHDD/bogdan/Documents  
lrwxrwxrwx 1 bogdan bogdan   22 Aug 26 21:30 Downloads -> /BHDD/bogdan/Downloads  
-rw-r--r-- 1 bogdan bogdan 8980 Aug 26 21:14 examples.desktop  
lrwxrwxrwx 1 bogdan bogdan   18 Aug 26 21:30 Music -> /BHDD/bogdan/Music  
lrwxrwxrwx 1 bogdan bogdan   21 Aug 26 21:30 Pictures -> /BHDD/bogdan/Pictures  
drwxr-xr-x 2 bogdan bogdan 4096 Aug 27 00:21 Public  
drwxr-xr-x 2 bogdan bogdan 4096 Aug 27 00:21 Templates  
drwxr-xr-x 2 bogdan bogdan 4096 Aug 27 00:21 Videos  

Output of sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL,ROTA,MODEL

sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL,ROTA,MODEL  
NAME   FSTYPE   SIZE MOUNTPOINT LABEL      ROTA MODEL  
sda             477G                          0 SAMSUNG MZNTN512  
├─sda1 vfat     487M /boot/efi                0   
└─sda2 ext4   428.8G /                        0   
sdb           931.5G                          1 HGST HTS721010A9  
├─sdb1 vfat     500M            ESP           1   
├─sdb2 ext4     818G /BHDD                    1   
├─sdb3 swap     7.6G [SWAP]                   1   
├─sdb4 ntfs     852M            WINRETOOLS    1   
└─sdb5 ntfs     9.2G            Image         1   

Update: Interstingly, I can download torrents to the HDD using the default client provided with 16.04 – Transmission

Update2: I installed Google Chrome today just to test whether it will be experiencing the same problem and it is not. I can save files with Chrome wherever I want, so it seems like the problem is to do with Firefox.

Update3: Tried resetting my Firefox profile with mv ~/.mozilla ~/.mozilla.old and using a clean one, however the problem still persists. Also tried reinstalling Firefox by first completely removing it from synaptic and then installing it again with synaptic. The issue is still present.

Update4: I have changed the ownership of /BHDD using chown username:username /BHDD and also set the read/write permissions using sudo chmod 755 /BHDD, but Firefox is still unable to save to this drive.

Best Answer

Ok, I just redid some of the things that I have listed above as not solving the problem and it went away - no idea why. Here is what I redid:

Reinstalled Firefox again through Synaptic - not with the button for reisntallation, but instead removed it completely and then installed it (probably no difference). I left my user files as they were, so it loaded all my extensions and options when I started it for the first time.

Afterwards, I set permissions with sudo chmod 755 /BHDD (which was around the 4th or 5th time of me doing it).

Then finally, I changed the ownership again with chown -R useername:username /BHDD and also chown -hR useername:username /BHDD. (I had also done these a few times).

Next, I opened Firefox and I could download stuff wherever I wanted. Black magic.

Related Question