Home folder folder permissions


#1

Hello,
I have a tmpfs folder mounted in my home folder. Here is the relevant fstab snippet:

tmpfs   /home/(myusername)/RAM         tmpfs   nodev,nosuid       0  0

How do I give snaps access to my tmpfs folder?


#2

I guess it is already accessible if your snap has connected to the home interface?


#3

What is this magic you speak of? aka. I am new to snaps, is that a default setting?


#4

Check out: Interfaces

Nope, the snap packager has to assert it in the first place, run snap interfaces _snap_name_ in the terminal to list all asserted and connected interfaces.


#5

I found the solution after reading what the home slot does. I didn’t own ~/RAM but root did with 1777 permission bits. now my fstab line looks like this and it works:

tmpfs   /home/(myusername)/RAM         tmpfs   nodev,nosuid,uid=(myusername),gid=(myusername),mode=1700,size=75%       0  0

The “uid=(myusername)” is the important part that makes me own ~/RAM and makes the snap have access to it via the home slot. this also solves my conundrum about how to make tmpfs for one user only (unless they use chown but that is an easy fix with chmod).