Samba share doesnt show folders with mounted disks

Hi again everybody.
Ive gone further in my little samba share project, and ran into new problems i cant seem to find solutions to on google.

My mount “share” works great.
But i created 3 new subfolders in /share and mounted 3 new harddisks in the folders. i see them all fine from console and have full rights but they dont show when i access “share” from a windows client.

smb.conf


[global]
        workgroup = WORKGROUP
        server string = Samba
        netbios name = Medie
        security = user
        map to guest = bad user
        dns proxy = no
        ntlm auth = true
        log file = /var/log/samba/%m
        log level = 1

[share]
        path = /share/
        read only = no
        guest ok = yes
        guest only = yes
~

fstab

/dev/mapper/fedora_fedora-root /                       xfs     defaults        0 0
UUID=4b41171f-c315-4cf3-9f1e-effc5f6b2fde /boot                   xfs     defaults        0 0
UUID=8EE7-72DE          /boot/efi               vfat    umask=0077,shortname=winnt 0 2
UUID=d17e6492-ee4a-4fd9-b910-7d87f0f97464       /share/Disk1-500GB      ext4    defaults,x-gvfs-show    0 0
UUID=7e6221ce-6f87-4475-b198-238ac585c92c       /share/Disk2-500GB      ext4    defaults        0 0
UUID=87239aee-596f-429c-ab67-9466a7ab91f7       /share/Disk3-256GB      ext4    defaults        0 0

ls -al

[Medie@fedora share]$ ls -al
totalt 3288
drwxr-xr-x. 12 nobody nobody    4096 23 nov 14:39  .
dr-xr-xr-x. 19 root   root       248 17 nov 10:16  ..
drwxr-xr-x.  3 nobody nobody    4096 23 nov 14:42  Disk1-500GB
drwxr-xr-x.  3 nobody nobody    4096 23 nov 14:44  Disk2-500GB
drwxr-xr-x.  3 nobody nobody    4096 23 nov 14:57  Disk3-256GB
drwxr-xr-x.  2 nobody nobody      99 22 nov 10:28  Eksporter
drwxr-xr-x.  2 nobody nobody      29 22 nov 19:14 'FINAL intro'
drwxr-xr-x.  2 nobody nobody      38 22 nov 19:14 'FINAL ramme'
drwxr-xr-x.  7 nobody nobody     137 22 nov 10:28 'lyd FX'
drwxr-xr-x.  3 nobody nobody      85 22 nov 19:13  Musik
drwxr-xr-x.  2 nobody nobody      19 22 nov 11:01  PNG-ramme
drwxr-xr-x. 13 nobody nobody    4096 22 nov 19:28  Råklip
-rwxr--r--.  1 nobody nobody      31 15 nov 14:34  share.bat
-rwxr--r--.  1 nobody nobody 3339565 22 nov 19:09 'Sputnik Jul_MASTER.prproj'

Do you need anything else?

is there a reason why you don’t combine the three disks and the space that you have available on / into a single volume using LVM. You could then mount it to /shareand share it using samba.

(to make the available space on / available, you need a seperate partition instead of extending your root partition into the free space, as per your previous post.

Yes there is.
I use old harddisks. If one fail it would be very sad to loose all the work on all 3 disks at once.

Wrong approach.
You need backups!

If one fails, it would be sad to loose whatever was stored one that one drive.
So either, cater for backups or don’t store anything that you can’t afford to loose on those drives.

Your right about that and ill look into that.
But the problem persists though.
I actually cant access any of the drives from samba at all. Now i just tryed to share a folder i called render1 where drive1 is mounted. I cant access that at all. I cant figure out what ive done wrong. Is it in the fstab or how come i get this problem. Im fairly new to fedora.
Ive never had this problem in debian, ubuntu or arch linux.

Who is this nobody user and group that owns almost everything listed in your first post.
From /etc/passwd I get

# grep nobody /etc/passwd
nobody:x:65534:65534:Kernel Overflow User:/:/sbin/nologin

and that user is not intended to own anything or run any processes as I recall. It is usually a catch-all for when ownership of things go wrong.

I have never seen a listing of files/directories that showed user&group ownership by nobody (except possibly a misconfigured samba server using an ntfs file system.)

It was some guide i found for full guest access without any hassle.
Do you believe the problem is the ownership? Ill try to add a normal user and give that user ownership and see if i can mount the harddisks. I just cant find the logic to why i can access the folders on the samba just not the harddisk mounted folders?

Not having a Windows system at hand, I tested with smbclient and it seems to work in this way. Even a legal user creates nobody files on the share. No idea whether SELinux can block things on a mounted drive, if enabled.

If possible via direct view or ssh, you can stop the smb service on the server, and start smbd in foreground with:

smbd -d 2 --debug-stdout -F --no-process-group

Increase the debug level until you get an idea why it does not work. Or examine the smb logfiles.

I have had alot of other projects to work on and finaly got around to test out the solutions.

Okay the Wierd thing here is that when i run SMBD with your command

smbd -d 2 --debug-stdout -F --no-process-group

It just works no problems at all. I guess this makes it a samba problem. And where do i change the samba launch parameters ive never had this issue before.

Thanks for the help.
It was a selinux problem.
I solved it by using this command on all disk drives

chcon -t samba_share_t /share/Disk1-500GB

2 Likes

Thanks for the feedback, lesson learned. With selinux enabled, an application can have a different behaviour in foreground or via systemd as service…