Version: (using KDE 4.3.2)
Installed from: Debian testing/unstable Packages
When I connect to our local Samba server using Dolphin, there are a few issues:
1. Files created by anyone appear to be owned by me, rather than an unknown username or UID number
2. Files created by me appear to be owned by me in Dolphin, but on the server they appear to be owned by UID 99 (account 'nobody'). Files created with smbclient
I will attach a screenshot of Yakuake showing one set of permissions (accurate) and Dolphin showing completely inaccurate file permissions for the same share.
This happens with the Samba server's smb.conf 'global' section both with 'unix extensions = off' and without that line present at all (not tested with 'unix extensions = on' at all). Useraccounts are authenticated via LDAP.
Logging in with smbclient uses the correct user permissions when I put a file there.
Samba service is from RHEL:
Name : samba
Arch : i386
Version : 3.0.33
Release : 3.7.el5_3.1
Local Debian package for libsmbclient:
Automatically installed: yes
Created attachment 38039 [details]
Inaccurate file permissions
This seems to be a pretty important issue.
Files are reporting permissions incorrectly in Dolphin and are creating files with incorrect permissions on the Samba server.
my mistake, it should be 'unix extensions = no' and not '= off'.
However, it doesn't correct the way that this functions.
Confirmed with KDE Frameworks 5.47.
*** Bug 302596 has been marked as a duplicate of this bug. ***
Probably related https://bugzilla.samba.org/show_bug.cgi?id=14101
This is in general all unrelated to us and happens inside libsmbclient respectively server-side. All we do to determine ownership is call smbc_stat, if that gives out wrong UIDs we probably can't do much about that. As I understand it posix ownership reporting in general only works with the unix extensions enabled, so perhaps in the interest of portability it'd make sense to not report a known owner/group at all.
There's however one defect that needs addressing on our end: uids are being mapped to local user names. That's an assumption that isn't portable. e.g. on the server a file is owned by uid 1000 and the local user name with uid 1000 is called john, so we'd report the owner as john. That's obviously silly and we should just report the uid.
Git commit 25a02064dbeea618e22dc2c0ba853b609f124f2c by Harald Sitter.
Committed on 13/02/2020 at 11:16.
Pushed by sitter into branch 'master'.
smb: do not map uid and gid
libsmbc returns the uid/gid of the process, not of the file, the data
is entirely useless to us. do not list it.
currently there is no way to get the actual uid/gid of a dirent. internally
there seems to be tech available that uses the samba unix extension but
that doesn't have any public API.
in short: we can't determine ownership client-side
Test Plan: no longer shows current user as owner. in particular when that is not true!
Reviewed By: ngraham
Subscribers: kde-frameworks-devel, kfm-devel
Tags: #dolphin, #frameworks
Differential Revision: https://phabricator.kde.org/D27293
M +4 -16 smb/kio_smb_browse.cpp