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)

3
  • By convention, you should mount them in /media/$USER/, but I don't know whether that is the issue.
    – Zanna
    May 2, 2018 at 7:03
  • Probably the apps which can't write to this partitions are installed as snaps?
    – mook765
    May 2, 2018 at 7:09
  • I just checked permissions in Software Centre for VLC and "read system mount information and disk quotas" is "off". Going to search around for what exactly this does and test turning it on. May 2, 2018 at 7:15

1 Answer 1

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
6
  • 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 :( May 2, 2018 at 8: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. May 2, 2018 at 8:05
  • And according to an answer here: askubuntu.com/questions/429848/… 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) May 2, 2018 at 8: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 2, 2018 at 8:30
  • Oh now I get it. Still confused about a couple other parts but that really helped thanks May 2, 2018 at 9:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .