having a unique problem with samba some files cannot be played over network using android phones

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
reptilezone2002
Level 3
Level 3
Posts: 105
Joined: Thu Aug 02, 2012 2:27 am

having a unique problem with samba some files cannot be played over network using android phones

Post by reptilezone2002 »

hi

i have linux mint mate 19.1 64bit setup as sumba server using smb protocol 2. sharing the Videos folder in my home folder. so the problem is some of the video clips cannot be played on android phones. but if i switch to smb protocol 1 everythng palyes on androd phones i checked the permissions & all the files is owned my the user & have both read & write access & the same user is have the read write access to samba shares overthe network.

so why is this happenning i dont want to go back to smb protocol 1 coz protocol 2 gives me a speed boost when trasferring files. hope u understand the question
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: having a unique problem with samba some files cannot be played over network using android phones

Post by altair4 »

A samba server will automatically negotiate which smb dialect to use with a client between LANMAN1 ( which pre-dates SMB1 ) all the way up to SMB3 so I do not understand this:
i have linux mint mate 19.1 64bit setup as sumba server using smb protocol 2
Are you using "server min protocol" and "server max protocol" in smb.conf to override this default? And if so why?
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
reptilezone2002
Level 3
Level 3
Posts: 105
Joined: Thu Aug 02, 2012 2:27 am

Re: having a unique problem with samba some files cannot be played over network using android phones

Post by reptilezone2002 »

altair4 wrote: Wed Mar 13, 2019 6:13 pm A samba server will automatically negotiate which smb dialect to use with a client between LANMAN1 ( which pre-dates SMB1 ) all the way up to SMB3 so I do not understand this:
Are you using "server min protocol" and "server max protocol" in smb.conf to override this default? And if so why?
i have a tv box with kodi 17.6 that only works with smb1 cannot update coz the specs is too low for kodi 18 it just cant play any.
i use client min protocol = SMB2 so the tv box can connect with smb1 & android phones can connect with smb2. if i use server min or max protocol the tv box cannot connect. but the problem is why only few videos cannot be played using smb2 (all the videos play nicely when using smb1) on android
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: having a unique problem with samba some files cannot be played over network using android phones

Post by altair4 »

reptilezone2002 wrote: Thu Mar 14, 2019 1:20 am i use client min protocol = SMB2 so the tv box can connect with smb1 & android phones can connect with smb2.
That makes no sense. Please post the output of the following command from the Mint box:

Code: Select all

testparm -s
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
reptilezone2002
Level 3
Level 3
Posts: 105
Joined: Thu Aug 02, 2012 2:27 am

Re: having a unique problem with samba some files cannot be played over network using android phones

Post by reptilezone2002 »

altair4 wrote: Thu Mar 14, 2019 8:53 am
reptilezone2002 wrote: Thu Mar 14, 2019 1:20 am i use client min protocol = SMB2 so the tv box can connect with smb1 & android phones can connect with smb2.
That makes no sense. Please post the output of the following command from the Mint box:

Code: Select all

testparm -s

rasitha@Server:~$ testparm -s
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Wi
ndows limit (16384)
WARNING: The "syslog" option is deprecated
Processing section "[printers]"
Processing section "[Desktop]"
Processing section "[Music]"
Processing section "[Videos]"
Processing section "[Mobile Backup-Rasitha]"
Processing section "[Mobile Backup-Anurada]"
Loaded services file OK.
WARNING: socket options = TCP_NODELAY SO_RCVBUF=524288
SO_SNDBUF=524288 IPTOS_LOWDELAY
This warning is printed because you set one of the
following options: SO_SNDBUF, SO_RCVBUF, SO_SNDLOWAT,
SO_RCVLOWAT
Modern server operating systems are tuned for
high network performance in the majority of situations
;
when you set 'socket options' you are overriding those
settings.
Linux in particular has an auto-tuning mechanism for
buffer sizes (SO_SNDBUF, SO_RCVBUF) that will be
disabled if you specify a socket buffer size. This can
potentially cripple your TCP/IP stack.

Getting the 'socket options' correct can make a big
difference to your performance, but getting them wrong
can degrade it by just as much. As with any other low
level setting, if you must make changes to it, make
small changes and test the effect before making any
large changes.

WARNING: You have some share names that are longer tha
n 12 characters.
These may not be accessible to some older clients.
(Eg. Windows9x, WindowsMe, and smbclient prior to Samb
a 3.0.)
Server role: ROLE_STANDALONE

# Global parameters
[global]
client min protocol = SMB2
dns proxy = No
log file = /var/log/samba/log.%m
map to guest = Bad User
max log size = 1000
obey pam restrictions = Yes
pam password change = Yes
panic action = /usr/share/samba/panic-action %
d
passwd chat = *Enter\snew\s*\spassword:* %n\n
*Retype\snew\s*\spassword:* %n\n *password\supdated\ss
uccessfully* .
passwd program = /usr/bin/passwd %u
security = USER
server role = standalone server
server string = %h server (Samba, Ubuntu)
socket options = TCP_NODELAY SO_RCVBUF=524288
SO_SNDBUF=524288 IPTOS_LOWDELAY
syslog = 0
unix password sync = Yes
username map = /etc/samba/smbusers
usershare allow guests = Yes
idmap config * : backend = tdb


[printers]
browseable = No
comment = All Printers
create mask = 0700
path = /var/spool/samba
printable = Yes


[Desktop]
path = /home/rasitha/Desktop
read only = No
valid users = rasitha


[Music]
guest ok = Yes
path = /home/rasitha/Music


[Videos]
path = /home/rasitha/Videos
read only = No
valid users = rasitha


[Mobile Backup-Rasitha]
path = /home/rasitha/Mobile Backup/Rasitha
read only = No
valid users = rasitha


[Mobile Backup-Anurada]
path = /home/rasitha/Mobile Backup/Anurada
read only = No
valid users = rasitha
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: having a unique problem with samba some files cannot be played over network using android phones

Post by altair4 »

Here is the part that makes no sense:
client min protocol = SMB2
The client refers to the Mint box as a samba client to another box.

Maybe I misunderstood your post.

### Are you accessing the android and tv box from Mint? If you are the client min protocol setting does have an affect.

### Or are you accessing the Mint box from the android and tv box? If you are the client min protocol setting will do nothing.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
reptilezone2002
Level 3
Level 3
Posts: 105
Joined: Thu Aug 02, 2012 2:27 am

Re: having a unique problem with samba some files cannot be played over network using android phones

Post by reptilezone2002 »

altair4 wrote: Thu Mar 14, 2019 2:37 pm Here is the part that makes no sense:
client min protocol = SMB2
The client refers to the Mint box as a samba client to another box.

Maybe I misunderstood your post.

### Are you accessing the android and tv box from Mint? If you are the client min protocol setting does have an affect.

### Or are you accessing the Mint box from the android and tv box? If you are the client min protocol setting will do nothing.
im accessing mint box from android & tv box i have removed the setting now & checked still some videos cannot be played when connected to the samba share using smb2 protocol but when conect using smb1 the videos playes normaly
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: having a unique problem with samba some files cannot be played over network using android phones

Post by altair4 »

A samba server in Mint19 will respond to a client running pre-SMB1 all the way up to SMB3 automatically.

You stated earlier that your TVBox can only access a samba server using SMB1:
i have a tv box with kodi 17.6 that only works with smb1 cannot update coz the specs is too low for kodi 18
So it looks like the only problem is the android device:
so the problem is some of the video clips cannot be played on android phones.
What app are you using on the android device?

And a question about this:
some videos cannot be played when connected to the samba share using smb2 protocol but when conect using smb1 the videos playes normaly
How exactly are you changing the smb protocol used on the android device? The app you are using on the android device allows you to change what protocol it's using?
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
reptilezone2002
Level 3
Level 3
Posts: 105
Joined: Thu Aug 02, 2012 2:27 am

Re: having a unique problem with samba some files cannot be played over network using android phones

Post by reptilezone2002 »

Question on the tv box. Kodi 17.6 can only be connected by smb1. I tried kodi 18. It can connect upto smb3. Then i tried to play the videos that not plsying in android & its not playing in kodi 18 (smb2)

Android file browsers defaultly connect via smb1 i use es file explorer & mxplayer so what i did was set max server protocol to smb2 & connected from android then it connects smb2. So the same videos cannot be played there then i removed max server protocol & reconnect it connects via smb1 the videos plays ok.

Im trying to use smb2 for my android coz i get a writing speeds of 7 m/s via smb2 but i get 2.6m/s via smb1

So until i resolve this issue. What im doing now it to have 2 file browsers on android one connected via smb2 & other via smb1.
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: having a unique problem with samba some files cannot be played over network using android phones

Post by altair4 »

Here is what I would do:

[1] Remove the socket options from your smb.conf. Then restart smbd:

Code: Select all

sudo service smbd restart
If you want to improve performance you might want to look at what Samba itself says on the subject: Performance Tuning

[2] Determine from the Mint server machine exactly what protocol the android device is connecting with:

*** If you haven't already done so remove server max protocol = SMB2 from smb.conf and restart smbd:

Code: Select all

sudo service smbd restart
*** Connect to your share from android

*** Then run this command in a terminal on your Mint machine to see how the android is connecting:

Code: Select all

sudo smbstatus
*** Then add server max protocol = SMB2 back to smb.conf, restart smbd sudo service smbd restart, then run smbstatus again to see how it's connecting now:

Code: Select all

sudo smbstatus
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
reptilezone2002
Level 3
Level 3
Posts: 105
Joined: Thu Aug 02, 2012 2:27 am

Re: having a unique problem with samba some files cannot be played over network using android phones

Post by reptilezone2002 »

yes i have done that & tested for weeks thats why i know how they connect & on whitch protocol. the error im getting is a network error on android i can brows without a problem & onley few files cannot be played within the same folder
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: having a unique problem with samba some files cannot be played over network using android phones

Post by altair4 »

I cannot reproduce your symptoms.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
reptilezone2002
Level 3
Level 3
Posts: 105
Joined: Thu Aug 02, 2012 2:27 am

Re: having a unique problem with samba some files cannot be played over network using android phones

Post by reptilezone2002 »

altair4 wrote: Tue Mar 19, 2019 7:14 am I cannot reproduce your symptoms.
Is there anyway to reset the permissions..? In my mind in thinking its a permission thing even though the permissions seems to be right. I cant think anything els
Locked

Return to “Networking”