Second example (with local FS) was to show that thunar_file_is_chmodable() can return TRUE but Thunar will fail later on apply if try to change for /111. (sorry, I forgot to describe that user must try to change perms for /111 to get error).
I try to show that thunar_file_is_chmodable() work incorrect in multiple ways and it is easy to not use it for enabling/disabling controls and let fail on apply.
I have mount point (as USER):
sshfs
root@172.16.0.254
:/ '/home/rim/mnt/172.16.0.254' -o workaround=all -o transform_symlinks -o default_permissions -o hard_remove -o noauto_cache
chmod 0777 /home/rim/mnt/172.16.0.254/test.txt
change file permission works from console and from other file managers, but in Thunar all UI controls on Permissions tab in file Properties - disabled.
This is not sshfs/FUSE specific case.
With local mount there is scenarios where thunar_file_is_chmodable() return TRUE and enables controls but on apply user get error:
(run this from root and Thunar from USER)
mkdir -p /111/222/333
chmod -R 0777 /111/
chmod -R 0555 /111/222/333/
chown USER /111/
Patch removes code that try to guess "is chmodable" and make controls in UI always enabled (except trashed files).
If file/dir is not really "chmodable" user will get error on apply.
Since thunar_file_is_chmodable() wrongly return FALSE for FUSE mount points (sshfs mounted with root remote account and probably other cases) and may return TRUE for local dirs that contains non chmodable files/dirs and wrongly return TRUE for some local mount points pathes