You are not logged in.

#1 2022-12-28 14:47:00

aidan.kael.oreilly
Member
Registered: 2022-12-28
Posts: 7

Thunar flags all text files on cifs mounts as executable - SOLVED

First post - please be kind - 60 years old but have been using Linux distros for decades.  Have been using Debian for many many years on my headless servers.  Have been using Arch XFCE4 on my desktop for several years now as daily driver.  Love the improvements to XFCE4 4.18, especially Thunar.

However, I have noticed something peculiar with Thunar on my Arch system which started recently - remote samba shares mounted to local folders employing cifs mounts, ALL text files are flagged as executable, whether they are executable or not. 

However, when connecting to same share via smb:// in Thunar, these files are NOT flagged as executable in Thunar.  Even the ones that truly ARE flagged as executable.

Admittedly, I have always configured Thunar to execute shell scripts because I'm lazy.  I have scripts for connecting to remote hosts, and also virtual workstations on my network, so when a client needs my help it's literally a click away.

It's not going to kill me to disable this feature in Thunar.  Right now, I have to in order to save my sanity because 90% of text files I access on network shares that are cifs mounted are notes for everything from soup to nuts.  And since I'm old and set in my ways, I just click on a text file to read it.  But now Thunar thinks every text file in a cifs mount is script (whether it is or not) and tries to execute it as such.  Would take me the rest of my lifetime to remember to right click on notes that are text files and choose open with mousepad. 

I can just use smb:// to connect, instead, but that's a little painful since I usually enjoy executing a script when I log on which maps remote shares to various local folders (I do not keep any data on my workstation).  And I would have to move my connection scripts to a local (not cifs mounted) folder due to the fact that via smb:// these scripts show as NOT executable in Thunar, whereas they do if they are cifs mounted.

I've never run into this before, and I'm not sure where to look.  Is the deficiency with Thunar?  Or cifs?  Or smb?  All of which were recently updated.

My Debian file servers have NOT been updated as recently as has my Arch desktop, so nothing has changed on server end, at least.

Would be happy to RTFM if I knew where to start, but so far chasing my tail on this one.

Problem did not exist prior to XFCE4 4.18 update, did not exist afterwards, at least not immediately... noticed yesterday because I went to edit a text note on cifs mounted share and Thunar tried to execute it as a script which hung my system.

If you think I'm too old to deal with this, that's fine.  I get a lot of that, lol.  I am very good at ferreting out issues, however, if I know where to look.

I will set up a clean Arch bare metal box for testing, and also an Arch vm as well… to see if I can recreate elsewhere...

Thanks in advance for any guidance you all are able to provide.  Much appreciated!

Last edited by aidan.kael.oreilly (2022-12-29 12:03:12)

Offline

#2 2022-12-28 15:22:22

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,223

Re: Thunar flags all text files on cifs mounts as executable - SOLVED

https://man.archlinux.org/man/extra/cif … unix_linux

Since SMB1 is dead since wannacry (disabled by default and you should avoid using it at all costs) you'll need a SMB3.1.1 capable server and maybe add the flag in your fstab.

Offline

#3 2022-12-28 16:10:15

aidan.kael.oreilly
Member
Registered: 2022-12-28
Posts: 7

Re: Thunar flags all text files on cifs mounts as executable - SOLVED

AH.  That server IS slated for a complete rebuild, something I intended to do over the holidays but have been too busy to get to it.  However, all was well until recent Arch updates, so I am to assume that one or more of these updates now cause unexpected behavior due to aged Debian version?  Ashamed to admit, Debian 9.13 on that machine.

I do not cite mounts in fstab, I use a script to manually mount the shares to local folders.

Interestingly, a new server I have been setting up is Debian 11, and haven't been able to connect to samba shares on this new server from Arch... I haven't had time to look into that issue yet, but that is curious...

Half the fun is troubleshooting, though...  smile

Offline

#4 2022-12-28 16:19:44

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,223

Re: Thunar flags all text files on cifs mounts as executable - SOLVED

You can nmap the server to detect the supported SMB version(s)
https://serverfault.com/questions/37873 … emote-host
SMB1 has been disabled a while ago, how frequently do you update arch?

Offline

#5 2022-12-28 17:21:26

aidan.kael.oreilly
Member
Registered: 2022-12-28
Posts: 7

Re: Thunar flags all text files on cifs mounts as executable - SOLVED

I update Arch every morning, sometimes at end of day as well.  I use AUR and I heavily use this machine for all kinds of tasks... maybe I can blame the MS apps I have on it?  lol  Did load Azure Data Studio, and have Edge dev loaded... maybe a few gremlins came with these ;-)

Granted, I've been using this Arch machine forever... could well be time for a lobotomy... rolling release is great, especially after having used Debian for desktop for so long... but there IS something to be said for a fresh install.

Can connect to Debian 11 samba shares from Windows 11, not Arch, though... so, not sure how much is in the mix here...

Can connect to samba share on Debian 9 from Arch...

Can connect to Debian 11 samba shares from Xubuntu 20 LTS...

Do have a new Arch bare metal in progress... among the million other things I have in the works...

Offline

#6 2022-12-28 17:49:41

aidan.kael.oreilly
Member
Registered: 2022-12-28
Posts: 7

Re: Thunar flags all text files on cifs mounts as executable - SOLVED

This is funny - how many times have I asked clients "Did you reboot?" when something didn't work?

A million times if once.

Rebooted my Arch box and can now connect to Debian 11 samba shares, both via cifs (fyi, i append vers=3.0 to end of command string) and via smb - however, SAME BEHAVIOR as with connecting to samba shares on Debian 9.13.

smb via Thunar indicates NOT executable even if text file HAS been marked as executable.  I had taken a script and copied to my desktop, assured the execute flag was set, then copied it to samba share on Debian 11 and Thunar indicates NOT executable.  Also mounted the samba share via cifs to local folder and Thunar DOES indicate the file is executable when I view properties in local folder where share is mounted.  However, it ALSO indicates my sample NOT executable text file for notes on the same share is ALSO executable.

I'm inclined to think it is Thunar.  There was an update for Thunar which was on 23 Dec at 4:10 am... which I think was the culprit, since I did not have this issue prior to that... and I had had the new XFCE4 4.18 desktop since it had been released in Arch in mid December...

So old Debian 9.13 server, new Debian 11 server, results are the same...

Gotta love it.  :-D

Offline

#7 2022-12-28 21:29:29

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,223

Re: Thunar flags all text files on cifs mounts as executable - SOLVED

Rebooted my Arch box and can now connect to Debian 11 samba shares

I suspect you ran a kernel update and were unable to load the cifs module as consequnce.

The flattened (differnt) permissions will be a result of the lacking posix extension, resulting in eg. 777
The UID mappig between host and client will be relevant, too.
https://wiki.archlinux.org/title/Samba#Manual_mounting

Also check "mount" to see the actual options used by gvfs (thunar) and cifs, but ideally, try to use the posix extensions if the server can provide SMB3.1.1 (3.0 won't suffice)

Offline

#8 2022-12-28 21:44:07

aidan.kael.oreilly
Member
Registered: 2022-12-28
Posts: 7

Re: Thunar flags all text files on cifs mounts as executable - SOLVED

Actually, I reboot after every update - and any time I see "arming condition needs update"... although I'm not quite sure that is necessary, the last part, from what I read that notification is or seems ambiguous?  I just like to start clean so 99% I shut down after updates.

When I start the Arch box, I don't use a display manager, I boot to tty and log in, run updates, shut down/start up if necessary after updates, log back in then run script to map samba shares to local folders before I finally start XFCE4...

I hardly ever understand half of what I see when I run mount... if even that, but perms are 755... below example taken after source/destination paths... sensitive info changed...

type cifs (rw,relatime,vers=3.0,cache=strict,username=xxxxx,uid=1000,noforceuid,gid=985,noforcegid,addr=xxx.xxx.x.xxx,file_mode=0755,dir_mode=0755,soft,nounix,serverino,mapposix,rsize=4194304,wsize=4194304,bsize=1048576,echo_interval=60,actimeo=1,closetimeo=5)

... although I am certain most readers here likely do.  Arch is very much a set it and forget system, at least that's what I have found... until there's a big update... but that's par for the course with any system, regardless type or nature...

Appreciate your input!

Offline

#9 2022-12-28 21:54:34

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,223

Re: Thunar flags all text files on cifs mounts as executable - SOLVED

https://man.archlinux.org/man/extra/cif … e_mode=arg
Try passing "file_mode=0644", things should™ no longer be executable.
Because of "vers=3.0" and "nounix" you're not getting posix extensions for sure - keep in mind that CIFS is not a POSIX FS and doesn't natively support the unix/posix concept of file permissions.

Offline

#10 2022-12-28 22:54:32

aidan.kael.oreilly
Member
Registered: 2022-12-28
Posts: 7

Re: Thunar flags all text files on cifs mounts as executable - SOLVED

I see.  Well, grasp it, at least, lol.

Apparently I have a lot more reading to do...

When things work, I tend to stick with the same methodology going forward, but things do change.

The most curious thing is, on other Linux desktops with shares mounted via cifs, although I see my text notes on the share marked as executable, when I click on them they just open in mousepad.  I'm quite sure I never before noticed that ALL text files locally mounted shares via cifs are marked executable.  If they opened in mousepad, then that was the result I am looking for... so no worries... look no further, lol...

HOWEVER - recently on Arch, when clicking on a text file in Thunar that's from a cifs mounted share, it can't tell the difference between a file with my client notes and an actual script, and tries to execute the text note as a script and freezes my desktop.  I thought perhaps the file I was editing was somehow corrupted, so I copied contents to a clean note - and the same inexplicable quirk transpired.

So, here is the oddity, really... and my bad for not ever noticing that all text files are marked as executable when mounted via cifs...

I should know more when I finish the new bare metal Arch box... will see what happens when I test on that...

Very interesting issue, I like puzzles and so love Linux, have used many distros but Arch is the best...  smile  And love XFCE... the two are a great combination...

Thank you so very much for all your feedback!

Offline

#11 2022-12-29 12:00:49

aidan.kael.oreilly
Member
Registered: 2022-12-28
Posts: 7

Re: Thunar flags all text files on cifs mounts as executable - SOLVED

I think I can restore Arch's honor.

As quickly as the issue arose, it disappeared after I rebooted - and had I not seen with my eyes when I ran HTOP, that a text file was trying to be executed as a script, I would have thought I imagined the whole thing, being a senior moment.  After I did that reboot yesterday, I had not purposefully tried again to click text files on cifs mounts because I knew that would just crash my desktop and I had work to do.

However, being the creature of habit that I am (and old, so, you know, memory isn't what it used to be) I needed to access a client note and just clicked on it instead of right clicking - and it opened in mouse pad.  WTF?

I can happily click away on my text files with notes on cifs mounts and these open in mousepad as they always have, and the ones which are truly flagged as scripts execute as they should.

So, I didn't follow my own advice which I always give to clients - reboot and try again.  They all use Windows, though - not sure why I thought Linux wasn't subject to the same.  Far less frequent with Linux, naturally.

I also always ask clients if they have had any spurious power surges or drops or outages.

And you know?  I HAVE had power issues the past week, some microsecond disconnects, but everything is connected to UPSs... EXCEPT... the AC powerline devices I use for network connectivity in my office.  Was too far from server room and too troublesome to run a cable, so these devices work great - HOWEVER, they must be plugged directly into a wall outlet, not a UPS, not a power strip.  And since its Ethernet over AC, that will make/break the connection if there's a power drop, but they always reconnect.  Happens occasionally, but never before had any noticeable odditites as a result, and the only way I usually know is the mail watcher applet for XFCE reporting it could not connect to mail host, displaying a little red x over the taskbar icon.   
So I am inclined to believe this may have been the cause, power drops affecting the AC powerline devices.  Perhaps something with new versions of packages in Arch for cifs and Thunar that manifests in different behavior than previously for cifs mounts shares when there's a drop in connection and then a reconnect.

I haven't been able to find any info on reliable 802.11ac wifi dongles for Arch, so that's why I just use the powerline devices.  I did have a great dongle for wifi that *did* work with Arch for a long while, but was only supported up to a certain kernel, so alas haven't been able to use any of those in years.

Thank you all for your feedback!  And making this a pleasant experience (some enthusiast who participate on this forum are downright scary).  I never post to forums, I've most always been able to work things out myself - and in this issue, should have just followed the Occam's razor principle - the simplest explanation tends to be the right one.  And also, if you search and search and SEARCH the web and no one else has the same issue, then it's something unique to your own setup. 

Found it hard to imagine Arch could be the problem - it's been the most reliable Linux distro I have ever used.

Thanks again and happy computing!

Offline

Board footer

Powered by FluxBB