Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: get hidden/archive/system porps on file #107

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

j3l11234
Copy link

@j3l11234 j3l11234 commented Jul 1, 2021

Hi,

I read samba's source code carefully and found them placed the hidden/archive/system porps in the execution flag.
So we can infer the original attribute value from these flags.

The correspondence is as follows:

hidden - > o + x, (other has exec permission)
archive - > u + x, (owner has exec permission)
system - > g + x, (group has exec permission)

File has default 644 permission mask but directory has default 755 permission mask
So directory cant determine weather has hidden/archive/system porps

Source: https://gitlab.com/samba-team/samba/-/blob/84b5440eb4f3c10e2729e916d097f5af07150dcd/source3/libsmb/libsmb_stat.c#L67


By the way, I also found the reason why the system.dos_attr.mode change from dos permissions mask to unix permission mask.
https://gitlab.com/samba-team/samba/-/commit/0fe9dc521#64c7de226f297840d2892b1c3d76cc68a56fbc72
This is one bug, and I have proposed merge request to the samba team to solve this problem.
https://gitlab.com/samba-team/samba/-/merge_requests/2056


I appreciate you checking the code and merging as soon as possible. Because my nextcloud urgently needs this part of the fix. Thanks!

@j3l11234 j3l11234 changed the title fix can't get hidden/archive/system attributes fix: get hidden/archive/system porps on file Jul 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant