LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 05-24-2019, 08:21 PM   #1
toothandnail
Member
 
Registered: Apr 2007
Location: Oxfordshire, UK
Distribution: Arch, Sparky, Salix64
Posts: 103

Rep: Reputation: 20
Problem with samba shares


Sometime in the last week or two, something has changed in my ability to mount samba shares. Arch Linux on the client end, Ubuntu server (happens with both 16.04 and 18.04).

The client end has smbclient installed, but not full samba. Using Thunar to connect to a share works fine, but anytime I try to copy a file to the server, I get a pop-up saying the remote file system is read-only. Both Arch and Ubuntu have had recent upgrades to samba, the most recent Arch update to smbclient was on the 22nd of May.

I have been able to mount the shares read-write from the command line, though a simple command line like this

Code:
sudo mount -t cifs //tarus/files /mnt/smb -o user=xyz,password=abc,rw
no longer works (I get permission denied if I try to copy a file to the share), I had to add "uid=1000" to the command to get write access as well as read access.

The odd thing is that I also have a copy of Manjaro XFCE installed on my laptop, and the problem does not happen there - I can still use Thunar to mount and write to the same samba share. While Manjaro is sometimes a few days behind in updates compared to Arch, they both tend to be quite close in update levels.

Any ideas for fixing this, or even working out what is going on would be helpful. I've yet to find any logging that helps, and the fact that Thunar thinks the share is read-only is strange, since a manual mount without the uid specified is giving me permission errors rather than suggesting the share is read-only.
 
Old 05-25-2019, 06:29 AM   #2
wpeckham
Senior Member
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 2,924

Rep: Reputation: 1260Reputation: 1260Reputation: 1260Reputation: 1260Reputation: 1260Reputation: 1260Reputation: 1260Reputation: 1260Reputation: 1260
Keep in mind that there are multiple pieces here, and that security on the server side BELOW SAMBA overrides anything in SAMBA.
I would examine the permissions and ownership on the server side first, then the SAMBA global and share settings in that order.
 
Old 05-25-2019, 04:25 PM   #3
toothandnail
Member
 
Registered: Apr 2007
Location: Oxfordshire, UK
Distribution: Arch, Sparky, Salix64
Posts: 103

Original Poster
Rep: Reputation: 20
Quote:
Originally Posted by wpeckham View Post
Keep in mind that there are multiple pieces here, and that security on the server side BELOW SAMBA overrides anything in SAMBA.
I would examine the permissions and ownership on the server side first, then the SAMBA global and share settings in that order.
I've looked at permissions and ownership on both servers - due to some oddities when Windows machines connected to the shares, I use secutiry=user and have a single registered user that accesses the shares in either network. Its probably too broad to be really secure, but they are small networks, well protected from any internet intrusions. The shared file areas are owned by the registered user, and read and write permissions are fine. As I mentioned, I can write to the shares from a Majaro login, as well as a Windows login and a login from a Debian stretch install. Arch is the only install that is having this problem.

Samba global settings seem fine, as do the share settings. They've all been in use for quite a while.

I'm not sure what software is used when accessing the shares using Thunar - gvfs certainly, but possibly also smbclient and cifs-utils. The gvfs packages have not bee updated recently, cifs-utils hasn't been update this year, the only thing that has been updated recently is smbclient.

I tried dropping back to an earlier version of smbclient, but that seemed to upset Thunar and it stopped seeing any samba shares. So I've been a bit reluctant to go much further with that. I have found Thunar's handling of remote file systems to be a bit fragile in the past, and I'm far from sure how to fix breakage in that area.

I'm also still confused by the fact that Thunar thinks the remote file system is read-only. In the past I've had permission denied messages from Thunar if ownership or permissions on samba shares were wrong. The "read-only" bit is new....
 
Old 05-25-2019, 08:32 PM   #4
wpeckham
Senior Member
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 2,924

Rep: Reputation: 1260Reputation: 1260Reputation: 1260Reputation: 1260Reputation: 1260Reputation: 1260Reputation: 1260Reputation: 1260Reputation: 1260
It sounds as if whatever Thundar is doing in the background is mounting either RO or as the wrong user. I would try using the client from the command line. This should either work, or give you better diagnostic and status messages.


After a session, working or not, check the log files for clues as to what went on.
 
1 members found this post helpful.
Old 05-26-2019, 02:29 PM   #5
toothandnail
Member
 
Registered: Apr 2007
Location: Oxfordshire, UK
Distribution: Arch, Sparky, Salix64
Posts: 103

Original Poster
Rep: Reputation: 20
Thanks for the suggestion. Tried smbclient to connect to one of the shares on my own server. Using this...

Code:
smbclient //tarus/files xyz -U paul -W ibmpeers
Connection was established without problems, and I was able to copy files from my laptop to the share without any errors or complaints. So smclient itself is working just fine. Must be something in the way Thunar is attempting to mount the share.

I also tried a manual mount to a local directory:

Code:
sudo mount -t cifs //tarus/files /mnt/smb -o user=paul,password=xxxxx,uid=1000,rw
That also works fine for both read and write, though I don't recall having to use the uid= in the past.

I guess I'll have to see if I can find out what Thunar itself is using to mount shares. In the meantime, I may look into autofs to get round having to either use scripts or remembering the syntax for manual mounting. I'm also going to have to remember to unmount any mounted shares before shutting down - systemd doesn't handle a mounted cifs share well when it comes to a shutdown or reboot.

I'm going to install Pcmanfm to see if it is Thunar itself that is broken, or whatever it uses (gvfs-smb?) to handle SMB mounts that has a problem.

Not going to mark as solved, since it isn't, but at least I've got some idea of where to go to solve it. Thanks for the suggestions.
 
Old 05-26-2019, 03:36 PM   #6
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 3,704

Rep: Reputation: 648Reputation: 648Reputation: 648Reputation: 648Reputation: 648Reputation: 648
The mount command should show you definitively how thunar is mounting the share.
 
Old 05-26-2019, 05:04 PM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 18,627

Rep: Reputation: 2709Reputation: 2709Reputation: 2709Reputation: 2709Reputation: 2709Reputation: 2709Reputation: 2709Reputation: 2709Reputation: 2709Reputation: 2709Reputation: 2709
It might be a bug in the latest gvfs-smb and a quick search didn't find much. Although you indicated that manjaro was working.

https://forum.manjaro.org/t/thunar-h...k3-issue/84499

Between linux boxes I prefer using sftp over samba.
 
Old 05-27-2019, 04:07 AM   #8
toothandnail
Member
 
Registered: Apr 2007
Location: Oxfordshire, UK
Distribution: Arch, Sparky, Salix64
Posts: 103

Original Poster
Rep: Reputation: 20
Quote:
Originally Posted by ferrari View Post
The mount command should show you definitively how thunar is mounting the share.
Hadn't thought of that. You're right, of course. When I get home this evening, I'll try 'mount' or 'findmnt' and see what they are showing...
 
Old 05-27-2019, 04:20 AM   #9
toothandnail
Member
 
Registered: Apr 2007
Location: Oxfordshire, UK
Distribution: Arch, Sparky, Salix64
Posts: 103

Original Poster
Rep: Reputation: 20
Quote:
Originally Posted by michaelk View Post
It might be a bug in the latest gvfs-smb and a quick search didn't find much. Although you indicated that manjaro was working.

https://forum.manjaro.org/t/thunar-h...k3-issue/84499
Hadn't seen that (I'm mainly an Arch user, installed Manjaro to have something that I could suggest to others as a distro to try..). I have noticed that Manjaro seems to be using quite a lot of Xfce 13.xx bits, which are only available from the Arch AUR for Arch itself. Though strangely, my Arch installs have a more recent version of Thunar than my Manjaro install.

Quote:
Between linux boxes I prefer using sftp over samba.
For quick file transfer between Linux machines, I tend to use the MC 'fish' connect. Have to watch it for big files, since MC spools to /tmp, which is often mounted on tmpfs, so it can quickly run out of space... For more general Linux - Linux transfers I tend to use NFS, which I find quicker and more reliable than samba anyway. Trouble is, I do have to work with Win stuff quite often, so having working samba connections available is important. Preferably without having to go through manual mounting of shares.

After my last message last night, I tried installing PcmanFM from the Arch repos, to try and see if the problem was in something like gvfs-smb or Thunar itself. PcmanFM works without errors - mounts the share, and allows file transfers in either direction. So it looks as though something is broken in recent versions of Thunar. Once I've been able to do a bit more checking, I'll raise a bug with the Arch maintainer, though it may be an upstream problem, since Arch packages are generally pretty vanilla.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
samba shares permissions as flexible as 2003server shares? fdelval Linux - Newbie 5 11-23-2010 08:29 AM
Can't View List of Shares in Nautilus, but can browse shares directly macgyver007 Linux - Networking 3 12-11-2008 04:13 PM
Samba 3.0.6 - How to mount Samba Shares from Windows 2003? kp1 Linux - Software 2 09-10-2004 06:03 PM
Linux can mount samba shares but not windows shares bindsocket Linux - Software 1 12-01-2003 05:28 PM
Mounting Samba shares and Samba Share Login time112852 Linux - Software 1 09-14-2003 02:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 05:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration