4

I have a dual boot setup with Ubuntu 15.10. I have my music stored on a separate internal (NTFS) HDD along with other files. Is there anyway to let Guest accounts access the music folder and ONLY the music folder on the second drive?

fstab gives access to the entire drive, so that is too much. It's not over a network so Samba isn't the answer either. I saw a post about gaining access using an Admin password but I'm never prompted for that and this is on a separate disk so it might be different. 2nd HDD automounts fine, I just can't get into it as a Guest user. Path to 2nd HDD is /mnt/(drive name). Owner listed as root.

9
  • How do you try to access it what is the error message you receive? Mar 10, 2016 at 6:49
  • It just says I don't have the necessary permissions. No code, no number, just the one sentence.
    – Olliver K
    Mar 10, 2016 at 7:46
  • may you share the related line in the /etc/fstab which mounts your HDD Mar 10, 2016 at 8:15
  • Have you tried to connect the HDD after you have logged in to the guest session? Mar 10, 2016 at 13:56
  • 1
    Wonder why - it mounts USB sticks. Probably the 'secret' lies in the file /etc/apparmor.d/abstractions/lightdm. Mar 11, 2016 at 3:24

1 Answer 1

1

Got it. /etc/apparmor.d/abstractions/lightdm was indeed the answer. It needed two lines of code:

/mnt/DriveName/Music/ r,
/mnt/DriveName/Music/** rmlix

Save the file and reparse:

sudo apparmor_parser -r /etc/apparmor.d/lightdm-guest-session

To edit lightdm, I suppose

sudo nano /etc/apparmor.d/abstractions/lightdm

would've worked but I made a text editor to operate as root: How to run programs as root user without using Terminal

Thanks for pointing me in the right direction.

2
  • 1
    Glad to hear that. But please note that it's a solution with a drawback. The file belongs to the lightdm package, and next time an update of lightdm includes changes to the file, your modifications will be overwritten. So you'd better make a note somewhere of what you did. Mar 11, 2016 at 11:31
  • I am aware of the drawback. I'm just happy to be able to do it without messing with the root account. Many hours spent searching the boards and RTFM and the many headaches resulted in an education. I've noted how to make the changes in a separate file. Thanks again for confirming lightdm is the right file.
    – Olliver K
    Mar 11, 2016 at 20:04

You must log in to answer this question.

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