sahlberg / libsmb2

SMB2/3 userspace client
Other
325 stars 136 forks source link

Exposing file attributes in smb2_stat_64 #253

Open BSzili opened 1 year ago

BSzili commented 1 year ago

Currently the only information you get is smb2_type which is a basic file/directory/link value. With file attributes one could implement some basic chmod support to manipulate the READONLY, HIDDEN, SYSTEM and ARCHIVE flags on shared files. This is related to issue #206.

memecode commented 7 months ago

Adding this is like a 2 line change. I even tried it and it was so easy. But in practice the server didn't do the right thing. I was hoping to get the read only flag on a ubuntu samba share but samba is too dumb to figure out if the logged in user has write access or not and set the flag appropriately. So it turned out to be not that useful in practice.