Samba Windoze client permissions question

I have configured a samba server on my workstation to facilitate a network connection from a Windows 10 machine.
It was not my intention to configure the samba server for guests in general but was aiming to make the samba share available for my specific machine.
I have been able to create the connection on the windoze machine but cannot get the permissions right.

Here is the present server smb.conf:-

alastair@ibmserv2:/etc/samba> cat smb.conf
# smb.conf is the main Samba configuration file. You find a full commented
# version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if the
# samba-doc package is installed.
[global]
        workgroup = ibmserv2
        passdb backend = tdbsam
        printing = cups
        printcap name = cups
        printcap cache time = 750
        cups options = raw
        map to guest = Bad User
        logon path = \\%L\profiles\.msprofile
        logon home = \\%L\%U\.9xprofile
        logon drive = P:
        usershare allow guests = No
        include = /etc/samba/dhcp.conf
        wins support = Yes
        usershare max shares = 100
[homes]
        comment = Home Directories
        valid users = %S, %D%w%S
        browseable = No
        read only = No
        inherit acls = Yes
[profiles]
        comment = Network Profiles Service
        path = %H
        read only = No
        store dos attributes = Yes
        create mask = 0600
        directory mask = 0700
[users]
        comment = All users
        path = /home
        read only = No
        inherit acls = Yes
        veto files = /aquota.user/groups/shares/
[groups]
        comment = All groups
        path = /home/groups
        read only = No
        inherit acls = Yes
[printers]
        comment = All Printers
        path = /var/tmp
        printable = Yes
        create mask = 0600
        browseable = No
[print$]
        comment = Printer Drivers
        path = /var/lib/samba/drivers
        write list = @ntadmin root
        force group = ntadmin
        create mask = 0664
        directory mask = 0775

[Samba_mastermedia]
        comment = shares multimedia from ibmserv2
        guest ok = Yes
        inherit acls = Yes
        path = /home/alastair/Mastermedia
        read only = Yes
alastair@ibmserv2:/etc/samba>

and on the windows machine here is my client:-

Samba_mastermedia (192.168.169.134 (Samba 4.15.7-git.376.dd43aca9ab2150300.3.32.1-SU))

which is the connection for which I need permissions.

I have a suspicion I have not set up permissions correctly and do not how to correct this.
Any help would be much appreciated please.
Budge.

Hi
Not knocking samba as it has it’s uses, but why not use the services already installed by default, namely ssh and sshfs?

Have a read here: https://phoenixnap.com/kb/sshfs

Good question. The background is I need to try and fix (debug?) a rather old Sony (solid state, not tape,) Walkman which has a Sony operating system and only limited file format tolerance. The device has internal storage and appears when connected as an USB device. It has an SD card socket for expantion. I had been loading my data onto an SD card which has been formatted as 256G exfat but it seems the Sony device is now not reading the files either from internal memory or SD card.

Working away from the office on an HP machine which has dual boot I can run windoze and do all the file manipulation using a Sony app which has replaced “Media-go”. Since all my data is on my workstation and normally uses NFS client on my Leap 15.3 system, I had in mind to serve the same data using samba so that it would work nicely with windoze. I suspect the device OS has non standard features which went out with the brown ball but are still needed for this device. Since the music data set alone is over 30,000 files I wanted to set up a “permanent” service for when I need to use the windoze.

You did ask!!!

And my problem is as usual down to my ignorance.

Hi
If it’s old (as you indicated) I doubt very much it can handle that size SD card? You need to check the Sony device specs, what size is the internal drive, that would probably set the max size of any sd card…

Hi Malcolm,
I have two of these Sony devices both with the same SD card. Both had been working a couple of years ago but had been unused for a while. Once charged, one worked by the book, the other less so and in trying to update the data it became worse at every stage. Before I re-format the SD card in the device, which is the required way apparently, I have been trying to be ready for using the data using the current Sony app which it tells me works on my device (Walkman NWZ-A15.). This app is intended to detect un-permitted media types and change to required format.

BTW I assume I install sshfs etc on Laep machine using ssh session and zypper. What are the files to install?

Hi
Install sshfs on the Leap machine, reboot and ensure the sshd service is running and allowed port (22) open if running the firewall.

Install winfsp and sshfs-win, a reboot of the windows machine is required. Then just open explorer right click on ‘This PC’, map network drive. I used the following for my test;


\\sshfs.r\<username>@<ip_address>

Entered password and connected to / on the linux host.

Hi Malcolm,
I see what you mean. Had a fright when Microsoft asked me for their login but that was them trying to spook me. I just used my normal login pw.
I shall need to do some work to get the right directory as the share but I am very impressed. No need for Samba this time!
Many thanks once more.

Hi
One less service (samba) to have installed and maintain… :wink:

I did try and get the right folder to show but system didn’t like the permissions I so accepted your root suggestion and drill down for what I need.
The Sony app immediately threw up what might have been the cause of my problems. Some of my music files have long filenames as in more than 256 characters and these are rejected by the windoze system. I thought I had curated these but it seems not.
The whole process is going to take me a long time and the speeds are rather slow even with gigabit copper connection but at least I am making progress.
Regards,
Budge

Hi Malcolm,
Slightly OT now as I am trying to understand what I am working with. Two questions:-

Will the share I have created be there several reboots later? I have been using Windoze for this but the machine will normally work on Leap 15.3 or possibly Laep 15.4 if I have time?

I am using the Sony app Music Centre for PC. For this to work I must import folders and when I do I am asked if the app wants me to save download on local machine. Now since I already have two copies already on NAS and workstation and there is no room on this hardware. My question is if I do not accept the download but the files are imported, what exactly is being imported. Whatever the app is still working away long after I had suspended my import activity to let it catch up. I wonder what is going on with 2 processors and 24 cores and threads I am sure it is not actually working efficiently!!! Will all my work be wasted if I shut down? There is almost zero technical info on this app. Any thoughts when you have a mo.

Hi
On windows, AFAIK you would need to do whatever is done for a share to be permanent when in windows (net use etc)??

In this app, if it wants to import, then it’s saving the files to the local storage, can’t it just use a folder?

Hi Malcolm,
I was able to resume the windoze connection after a boot but I think the most important issue for me to bring back here, if I may, is having the shared directory on the Linux machine to be accessible rather than the root.

At present I have used the sshfs.r as you did in your demo. This shows me the root tree. I can get to the directory I need by drilling down but when the windoze Sony app it seems to see the whole path so all those characters are added to the “file” and many of my carefully curated media files are rejected by the 256 character limit. The command is clear:-

\\sshfs.option]\<remote user>@<remote host>!port]\path]

But I am struggling with the meaning of !port and \path. Are these on the linux server or being set in the windoze client mount?
Also the options seem limited. Still trying to find the man page for these options which are not obvious in the sshfs --help pages.
Cheers.

I have it working now using \ as in windows for the path not / as in linux.
Seems to be OK.

The sequel to this is that the windoze system works well with sshfs if needed and rather well, for which many thanks Malcolm.

In the end however I have not used it in anger. My initial work with windoze did not resolve the problem with the USB Walkman device in spite of using the app “Sony Media Server for PC” as the instructions suggested. What I did do was re-format the device and re-install the firmware and then force a rescan of the data of a sample upload and all was well, but the Sony software is unsuitable for classical albums. I found however that once I had done the spring cleaning my Leap 15.3 data works just fine with no windoze in sight.

The Sony system within the device uses their strange understanding of albums so I have to ignore the choice of artist and composer but working with folders and I am fine and apparently the device can now work with SD cards larger than my 256GB. I think the library build might take a while!
Thanks again Malcolm.

Once again I wrote too soon. I am still having many issues with the Sony Walkman and have had to work in windoze for a bit. I have the sshfs share working but have run into a strange problem in that one subdirectory with an album is not found by windoze but is there when I go to the linux system. I have two albums of the same work by different artists. These are what I have in my ibm server using ssh connection to view these:-

drwxr-xr-x 2 alastair users 4096 Aug 28 2017 Bach - Goldberg Variations, BWV 988 (Andreas_Staier)
drwxr-xr-x 2 alastair users 4096 Aug 28 2017 **Bach - Goldberg Variations, BWV 988 (Trevor Pinnock) **

These same files are what I have on my HP Linux machine using NFS share from server and are the same as far as I can see:-

drwxr-xr-x 2 alastair users 4096 Aug 28 2017 Bach - Goldberg Variations, BWV 988 (Andreas_Staier)
drwxr-xr-x 2 alastair users 4096 Aug 28 2017 **Bach - Goldberg Variations, BWV 988 (Trevor Pinnock) **

.

I shall have to re-boot now to bring up the windoze system on this same computer and have no idea how I can save what I have written so far!

Seems I can edit from windoze if I am quick so here is what I have in my windoze machine:-

Music (\sshfs.r\alastair@192.168.169.134\multimedia\AV_multimedia)

Sorry no code button in edit but these all appear in the explorer file correctly however when I try and copy the files to my SD card device the Trevor Pinockversion is “Not Found”

Hope fully here is my screenshot:-

[https://u.pcloud.link/publink/show?code=XZ0Lj4VZbHXyWK7uPL8Ud6FXiKDSpyymXV3X

Sorry this didn’t work. Will try another method.](https://u.pcloud.link/publink/show?code=XZ0Lj4VZbHXyWK7uPL8Ud6FXiKDSpyymXV3X)

Hi
Maybe character encoding, spaces. Open a powershell and see if can copy manually.

The pCloud didn’t work when created by windoze but this may do the trick:-

https://u.pcloud.link/publink/show?code=XZ2hj4VZGWh2X1vMpEufoME29vepcmqUUSuyThis is now working. What is strange is that both files appear correctly in the share on windoze. It is only when trying to copy to the SD card that I Get the problem.

I should have clarified, it is the link that is working not the file system.
I have been through everything I can on the offending directory including removing possible illegal characters in them individual files and reducing the length of filenames within the directory but nothing worked.
In the end I created a new identical directory on the SD card and copied the contents into it. This did work without any problems but I have no idea what is causing the underlying problem.
Will press on.

My problem has been solved. There should be a small health warning when mounting a linux system share on a windoze system.

My problem has been due to minor “errors” in my files when viewed by windoze. My music data had curated for many years using linux and I have usually avoided windoze illegal characters so that the files work in devices which are windoze orientated.

I eventually found three errors in 10,000 files, one “.” at the end of a file name and two spaces at the end of a file names.

Because I had loaded my SD card using linux, it was only when moving files on SD card to another device that the problems became apparent.

My problem was exacerbated by having to use a console in windoze which has characters on a black ground. I couldn’t find out how to change that and using cli on windoze the directories showed as dark blue on a black ground. Difficult to see those extra spaces!!!
A tale told by an idiot, full of sound and fury and signifying nothing.