0

I'm having a weird issue with my pi. Pi is set up as SMB host, hosting music files for access around the house. I can't modify the files from any of the other computers though, except with sudo.

I have set all permissions recursively on the whole music collection to 0777. My smb.conf share is set up thus:

[share]
Comment = pi shared folder
Path =/mnt/share
Browseable = yes
Writeable = Yes
only guest = no
create mask = 0777
directory mask = 0777
public = yes
Guest ok = yes
create mask = 0777

If I need to edit a tag, or rename a file, I navigate either in puddletag or nautilus to the file in question, and when I try to edit I get a permission error. If I do either of these things with sudo, however, I can edit freely.

Doing my music maintenance as elevated user is obviously an ok workaround, but a bit annoying. Does anyone know what I've done wrong?

P.S. I'm no pro at this stuff, if I've missed any key info please let me know and I will supply it.

P.P.S The drive I'm sharing is formatted as ext4.

  • 1
    Did you restart samba after this configuration was saved? – Tomasz Mar 4 at 0:29
  • You've not moved the question only reposted. You should delete one of them. – Tomasz Mar 4 at 0:31
  • It's been configured like this for quite some time, so it's been through numerous shutdown/restart cycles. Also, noted, thanks. I'll delete the other one. – Frazbro Mar 4 at 0:48
0

Your configuration states only that

Guest ok = yes

This only allows guest to access the service without password and operate within powers of the guest account. But what are they? By default it's nobody. Does he have access to your music collection? Remember that if the collection is inside your /home/you directory, then even if you set wide open permissions on the collection folder, nobody or another user might not even get that far getting stopped by some more restrictive permissions down the way.

Possibly then you just need to overrule the default nobody with someone more privileged:

Default: guest account = nobody # default can be changed at compile-time

Example: guest account = ftp

Or you might move the collection to a more accessible place.

Remember to reload or restart your Samba service after the configuration's been saved.

  • Thanks for the lead, I'll look into that. The collection is mounted at /mnt/share, should I move it elsewhere, or was the /home/you comment a caveat rather than a suggestion? – Frazbro Mar 4 at 1:07
  • @Frazbro /mnt/share is alright. I'd first check its permissions and then find or create a suitable user. guest account = that_user, smb reload and that's it. – Tomasz Mar 4 at 1:52
  • @Frazbro /home/you directories are usually private. – Tomasz Mar 4 at 1:52
  • Great, thanks. That's what I thought re /home/you – Frazbro Mar 4 at 2:39
  • In the end this didn't help, but I changed my fstab on the client computer to mount the share as gues, with UID mask 1000. Previously I had set a username and password and specified them using a file smbcredentials. I gather that the user specified in smbcredentials did not exist/was not added to the right list/had the wrong password. It's now working as desired, although with lower security. – Frazbro Mar 7 at 3:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.