Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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....
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.