0

Ubuntu 18.04 LTS, GNOME 3.28.1

So I edited fstab to automatically mount my 2 extra hard drives. I added the lines:

UUID=CA3E5AC13E5AA66B   /home/plaguedoc/Media   ntfs    defaults    0   1
UUID=18550E2F479E1462   /home/plaguedoc/Software    ntfs    defaults    0   1

But now any time I try to open any file (movie, music) or save new word documents, the software I'm using tells me I don't have the permissions to access the HDDs. Specifically, VLC thinks I'm trying to stream a movie over the internet, and if I try using "open file" it cannot see the contents of my hdd, and LibreOffice actually tells me I do not have permission to access the HDD and cannot see the contents when saving or opening files. Copying and pasting files with file manager works just fine, and if I move the movies to my desktop I can play them without any trouble. I can also save documents to the SSD where my OS is installed and then simply copy and paste them where I like.

Oddly enough, my torrent software has no trouble downloading and saving to my software drive. I can also open/view pictures and even edit the existing word documents on my hdds.

I read up on adding uid/gid/fmask/dmask but apparently this will only limit permissions, it can't add new ones.

I have also read that chmod can set permissions, but this will have to be repeated every single time I reboot, which means it is not a practical solution.

Is this issue based on having mounted them in /home/user? Should I be mounting elsewhere? Is there a permanent solution to setting permissions for my HDDs? Is this possibly an issue with where Ubuntu Software Centre is installing my software? (Default OS programs seem to work fine but any others I installed don't)

1 Answers1

0

Check who owns the folder and files in it with

ls -lah /home/plaguedoc/Media

It's likely owned by the user root and that's why your user doesn't have permissions. Add uid=1000 or uid=yourusername. This will change who owns the folder to you and you will be able to read and write to it.

https://help.ubuntu.com/community/AutomaticallyMountPartitions

So something like this:

UUID=CA3E5AC13E5AA66B   /home/plaguedoc/Media   ntfs    rw,user,auto,fmask=0177,dmask=0077,uid=1000    0   1
UUID=18550E2F479E1462   /home/plaguedoc/Software    ntfs    rw,user,auto,fmask=0177,dmask=0077,uid=1000    0   1
Katu
  • 3,593
  • 26
  • 42
  • Do I actually require to tell it to allow "exec" as well as "rw" or is that enabled by default? I do want to run software, after all. And how does adding "rw" differ from setting the permissions under f/dmask? And don't I want something more like 0771 for f/dmask if it's reading it as "octal, owner, group, world"? I thought I was getting the hang of this :( – Plague Doctor May 02 '18 at 08:03
  • and why am I adding "user" if I'm also setting "uid=1000" how are they different :( I'm so confused and nothing seems to help. I've been reading for hours. – Plague Doctor May 02 '18 at 08:05
  • And according to an answer here: https://askubuntu.com/questions/429848/dmask-and-fmask-mount-options#429858 u/f/dmask uses inverse octal so maybe your numbers are correct, but I don't understand why I wouldn't want full permissions for myself on everything (eg, 0077 for both f&dmask) – Plague Doctor May 02 '18 at 08:19
  • If you want to know the details, you will have to continue reading the documentation. I'm not an expert and my explanation is going to be worse than what's out there. In general, you are mounting an existing drive. You are not setting permissions to the files, you are assigning a user for the mount point and limiting permissions, if you want, because you probably don't need them (so you mask what you don't need). – Katu May 02 '18 at 08:30
  • Oh now I get it. Still confused about a couple other parts but that really helped thanks – Plague Doctor May 02 '18 at 09:20
  • @PlagueDoctor you are welcome. If you find the answer useful, you can upvote it. If it solves your problem, you can accept it as a valid answer. Thanks and welcome to askubuntu! – Katu May 02 '18 at 12:11