Posts: 47
Threads: 3
Joined: Apr 2021
Reputation:
0
(11-03-2022, 04:19 PM)Tim Curtis Wrote: (11-03-2022, 02:57 PM)TheOldPresbyope Wrote: @rph-r
@Tim Curtis
OK, I found the bug that causes the behavior I reported in my post #70
In /var/www/sys-config.php there's this nugget
Code: // SMB
if (isset($_POST['update_fs_smb'])) {
if (isset($_POST['fs_smb']) && $_POST['fs_smb'] != $_SESSION['fs_smb']) {
phpSession('write', 'fs_smb', $_POST['fs_smb']);
submitJob('fs_smb', $_POST['fs_nfs'], 'Settings updated', '');
}
}
That last line (line 265 in my file) should be
Code: submitJob('fs_smb', $_POST['fs_smb'], 'Settings updated', '');
With this fix the SMB file sharing service is reliably accessible from my LAN when it's supposed to be.
I'd be interested to hear if making this fix affects the behaviors reported by others on this thread, some of which I still haven't figured out.
Regards,
Kent
It prolly was the root cause.
This bug results in the SMB on/off setting using the NFS on/off setting thus if NFS is off then SMB will also always be off even when the toggle is ON :-0
It's fixed for upcoming 8.2.3 but in the meantime here's a patch for that php file. Just paste it at the command prompt and then restart the servers.
Code: # Command to patch the file
sudo sed -i s"/submitJob('fs_smb', \$_POST\['fs_nfs'\]/submitJob('fs_smb', \$_POST\['fs_smb'\]/" /var/www/sys-config.php
# Restart servers
moodeutl -r
it's working for me! thank you
Posts: 6,025
Threads: 176
Joined: Apr 2018
Reputation:
235
@ Phosphoric
I have tried to replicate your network environment as closely as possible. In a nutshell, I'm unable to repro your issue.
Among the 2 dozen different devices on my LAN, I now have
1. my Linux Mint laptop
2. an RPi3A running as a moOde 8.2.2 player (let's call it 'A') which I'll use as an SMB client
3. a CM4 running as another moOde 8.2.2 player (let's call it 'B'). There's a USB thumb drive which is being served via SMB file sharing from this host (let's call the share 'B-Music').
4. an RPi3B running OMV 5.6.26-1 (let's call it 'C'). The SMB service on this host is enabled and serving a Music share (let's call the share 'C-Music').
From the moOde player A I can mount both B-Music and C-Music SMB file shares and see all their contents in A's Library views.
On the Linux Mint laptop, I can use the Caja File Manager to browse the network and see host B and host C. I can click on either one, then click on the Music share offered, and browse its contents.
Candidly, I did not expect otherwise, since this is how the SMB scheme is supposed to work. It seems to me that you may be having some sort of LAN-level issue, perhaps even at the router, which is causing the symptoms you describe. The first thought I had was perhaps it has to do with DNS/mDNS namespaces but that's pure speculation.
Regards,
Kent
PS - about that OMV 5.6.26-1. I spent more time than I want to admit trying to build OMV on the latest raspbios lite x64 using the OMV install script (which their Wiki says would have resulted in OMV 6.0.x) and failed. Trying, instead to build OMV on the latest raspbios lite armhf (e.g., 32-bit) using the OMV install script worked first time out of the gate, resulting in OMV 5.6.26-1. All moOde players and the LMT are running 64-bit OSes.
Posts: 33
Threads: 2
Joined: Oct 2022
Reputation:
0
11-06-2022, 04:54 PM
(This post was last modified: 11-06-2022, 05:04 PM by Phosphoric.)
(11-05-2022, 06:47 PM)TheOldPresbyope Wrote: @Phosphoric
I have tried to replicate your network environment as closely as possible. In a nutshell, I'm unable to repro your issue.
Among the 2 dozen different devices on my LAN, I now have
1. my Linux Mint laptop
2. an RPi3A running as a moOde 8.2.2 player (let's call it 'A') which I'll use as an SMB client
3. a CM4 running as another moOde 8.2.2 player (let's call it 'B'). There's a USB thumb drive which is being served via SMB file sharing from this host (let's call the share 'B-Music').
4. an RPi3B running OMV 5.6.26-1 (let's call it 'C'). The SMB service on this host is enabled and serving a Music share (let's call the share 'C-Music').
From the moOde player A I can mount both B-Music and C-Music SMB file shares and see all their contents in A's Library views.
On the Linux Mint laptop, I can use the Caja File Manager to browse the network and see host B and host C. I can click on either one, then click on the Music share offered, and browse its contents.
Candidly, I did not expect otherwise, since this is how the SMB scheme is supposed to work. It seems to me that you may be having some sort of LAN-level issue, perhaps even at the router, which is causing the symptoms you describe. The first thought I had was perhaps it has to do with DNS/mDNS namespaces but that's pure speculation.
Regards,
Kent
PS - about that OMV 5.6.26-1. I spent more time than I want to admit trying to build OMV on the latest raspbios lite x64 using the OMV install script (which their Wiki says would have resulted in OMV 6.0.x) and failed. Trying, instead to build OMV on the latest raspbios lite armhf (e.g., 32-bit) using the OMV install script worked first time out of the gate, resulting in OMV 5.6.26-1. All moOde players and the LMT are running 64-bit OSes. @ TheOldPresbyope
Thank you once again Kent for spending so much time on my problem. To be honest I've been somewhat distracted the whole weekend after trying to upgrade from OMV5 to OMV6. It was a complete disaster and in trying to fix it, I managed to trash more and more of my system. I gave up after several trys at OMV6, it appears to be too unstable for me. It took a great deal of effort also to get the permissions right so that I could browse my shares via my Linux Mint pc. Currently working my way back to recovering OMV5. A very depressing weekend.
Just one point on your experiment, you were able to view all of those shares from different sources. I am able to do that but can't write to them.
As usual, whilst my RPI NAS was off line, the mo0de shares became writeable again. Really weird.
Thanks again
Ray
Posts: 6,025
Threads: 176
Joined: Apr 2018
Reputation:
235
@ Phosphoric
Hi, Ray.
Just a note to say I *can* create and write into files on either SMB share.
Regards,
Kent
Posts: 126
Threads: 19
Joined: Jul 2021
Reputation:
1
11-11-2022, 01:05 PM
(This post was last modified: 11-11-2022, 01:05 PM by Sehnsucht.)
(11-05-2022, 10:50 AM)rph-r Wrote: (11-03-2022, 04:19 PM)Tim Curtis Wrote: (11-03-2022, 02:57 PM)TheOldPresbyope Wrote: @rph-r
@Tim Curtis
OK, I found the bug that causes the behavior I reported in my post #70
In /var/www/sys-config.php there's this nugget
Code: // SMB
if (isset($_POST['update_fs_smb'])) {
if (isset($_POST['fs_smb']) && $_POST['fs_smb'] != $_SESSION['fs_smb']) {
phpSession('write', 'fs_smb', $_POST['fs_smb']);
submitJob('fs_smb', $_POST['fs_nfs'], 'Settings updated', '');
}
}
That last line (line 265 in my file) should be
Code: submitJob('fs_smb', $_POST['fs_smb'], 'Settings updated', '');
With this fix the SMB file sharing service is reliably accessible from my LAN when it's supposed to be.
I'd be interested to hear if making this fix affects the behaviors reported by others on this thread, some of which I still haven't figured out.
Regards,
Kent
It prolly was the root cause.
This bug results in the SMB on/off setting using the NFS on/off setting thus if NFS is off then SMB will also always be off even when the toggle is ON :-0
It's fixed for upcoming 8.2.3 but in the meantime here's a patch for that php file. Just paste it at the command prompt and then restart the servers.
Code: # Command to patch the file
sudo sed -i s"/submitJob('fs_smb', \$_POST\['fs_nfs'\]/submitJob('fs_smb', \$_POST\['fs_smb'\]/" /var/www/sys-config.php
# Restart servers
moodeutl -r
it's working for me! thank you Altering that file fixed my "samba doesn't work from anywhere" issue (thanks!) and has reverted to my original "samba doesn't work from some random Android app" one. I'll just ignore it and use rsync.
Posts: 6,025
Threads: 176
Joined: Apr 2018
Reputation:
235
@ Sehnsucht
As an experiment, I installed the X-plore File Manager app on my Pixel 3A (Android 12) phone. Maybe I just don't understand how to configure it, but I could not get it to access either my moOde players' SMB share or the SMB shares on my OpenMediaVault NAS. "SMB access denied" or somesuch.
As a counter-example, the Owlfiles app on the same phone accesses both of these share sources without my having to do anything special.
Life is short. I simply deleted X-plore and drove on.
Regards,
Kent
Posts: 33
Threads: 2
Joined: Oct 2022
Reputation:
0
11-13-2022, 04:02 PM
(This post was last modified: 11-14-2022, 08:04 AM by Phosphoric.)
(11-06-2022, 08:52 PM)TheOldPresbyope Wrote: @Phosphoric
Hi, Ray.
Just a note to say I *can* create and write into files on either SMB share.
Regards,
Kent
@ TheOldPresbyope
Hi Kent, thank you once again for your hard work and patience.
I was resolved to put up with a workaround to avoid my smb permission issues but you have kept me intrigued. I also don't like to give up!!
After countless hours of studying different config files and service status I believe I have found the problem and solution.
The avahi-daemon was corrupted on two of my working Mint PCs.
In Synaptic Package manager I completely deleted and re-install the various avahi packages and at last I can see all my SMB shares and have full permissions for them.
What a marathon for me to get this far, so many frustrating hours but at last I think I have cracked it.
I'll mark my original post as "solved", not this one as it's not my post.
Thanks again to all who helped me along the way.
Regards
Ray
Scrub round the above. Next morning's reboot of pc and I've lost mo0de permissions again.
|