Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5107

Networking and servers • Re: Samba share suddenly inaccessable

$
0
0
SOLVED IT.

For some reason, the \media\pi\ folder had several folders with the same name as the drive. Deleted these, back in business.

If anyone knows why it might have happened in the first place, please let me know so I can hit something with a hammer to stop it happening again.

Probably the desktop automounter not cleaning up after itself. It creates the mountpoints based on partition information when the drive is detected. It's supposed to delete them when the drive is disconnected but sometimes it doesn't. When that happens it creates a new mountpoint with a numeric suffix and uses that instead.

That said, if the primary purpose of the drive is for hosting Samba shares you should be mounting it via /etc/fstab and mounting it under /srv. Not least because I'd expect guest users to be unable to access it under /media/pi (default permissions on /media/pi prevent it).

If you are relying on the desktop automounter, be aware that:
  1. If no one is logged in to the desktop the partition(s) will not be mounted and the mountpoint will not be created.
  2. If a different user is logged into the desktop things will be mounted in a different place.
Oh, and it's / not \. \ is a Windows thing and has a different meaning under Linux.

[shameless self promotion]
For more details see Building A Pi Based NAS and Using fstab A Beginner's Guide
[/shameless self promotion]

Statistics: Posted by thagrol — Sat Apr 27, 2024 12:38 pm



Viewing all articles
Browse latest Browse all 5107

Trending Articles