2

I want my guest accounts to be able to access ~/Music. I've changed the settings in my main account but can't find the share when I start a guest session. Where should I look, or what am I doing wrong?

Edit: Now I can see the root folder by browsing to "Network", but can't access any sub-directories.

alt text

1 Answers1

2

You are doing it wrong.

The Shares you are setting up as described in your question are network shares. For people accessing your PC over a network. You most likely don't want any shares.

There are many ways to set permissions to allow user "guest" to access files in ~/Music.

Here is one way:

Assuming you are happy for anyone to access this directory you can do this.

Check permissions on your home directory allow anyone to access it's contents. Running ls -l should return this

richardjh@ubuntu ~ $ ls -ld ~
drwxr-xr-x 57 richardjh richardjh 4096 2010-10-28 09:10 /home/richardjh

The important bit is the drwxr-xr-x

Set Permissions on ~/Music and all subfolders to 755 like this

find ~/Music -type d -exec chmod o+rx {} \;

Set Permissions on all files in ~/Music and it's subfolders like this

find ~/Music -type f -exec chmod o+r {} \;

Log in as guest and you should be able to browse the Music directory and play the files within.

  • You could if you insist set up a file server on your machine and then as another user access those files over the network and back to your local machine. It is probably not what you want to do. – Richard Holloway Oct 28 '10 at 12:49
  • Works, thanks very much. Just a minor typo on last command: "- type f" should be "-type f". – Internet man Oct 28 '10 at 12:59
  • Max: Thanks man. It is the minor typos that cause the major issues. I have corrected the command. – Richard Holloway Oct 28 '10 at 13:03
  • This method doesn't work on 12.04: guest user isn't allowed to read any file in /home /media /mnt even if with correct permissions – Dariopnc Nov 09 '12 at 14:14
  • That was over 2 years ago that I wrote that and things have changed. If you are having problems now it might be worth asking a new question and tagging it 12.04. – Richard Holloway Nov 12 '12 at 23:07
  • @Dariopnc Did you find a way that works in later releases? – jarno Feb 27 '16 at 08:25
  • @jarno unfortunately not. TBH I stopped trying – Dariopnc Feb 28 '16 at 16:05
  • 2
    @Dariopnc Maybe by editing file /etc/apparmor.d/abstractions/lightdm you can add read access for a directory. E.g. adding a line /home/me/Music/** r, would add read permission for stuff under /home/me/Music/, I think, supposing you don't have encrypted home directory. – jarno Feb 29 '16 at 22:13