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

avoid detecting permissions to be invalid on linux NTFS file system #7745

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mgallien
Copy link
Collaborator

Close #7613

Close #7613

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
NTFS file system on Linux reports wrong permissions

client believes they need to be fixed but as they cannot, we end-up
having an infinite loop

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
@nextcloud-desktop-bot
Copy link

AppImage file: nextcloud-PR-7745-c67aa8dde2ed198018cf3d41e91f9739fc2cf222-x86_64.AppImage

To test this change/fix you can simply download above AppImage file and test it.

Please make sure to quit your existing Nextcloud app and backup your data.

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
6 Security Hotspots
87 New Code Smells (required ≤ 0)
E Reliability Rating on New Code (required ≥ A)
2 New Bugs (required ≤ 0)
E Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

#if defined Q_OS_LINUX
const auto fileSystemInfo = QStorageInfo{_localPath};
qCInfo(lcEngine()) << "File system type for current sync folder:" << fileSystemInfo.fileSystemType();
if (fileSystemInfo.fileSystemType() == "NTFS") {
Copy link

@mbiebl mbiebl Jan 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm getting

2025-01-10 15:44:55:888 [ info nextcloud.sync.engine /drone/src/src/libsync/syncengine.cpp:645 ]:↦      File system type for current sync folder: "fuseblk"
michael@mars:~$ findmnt /mnt/data 
TARGET    SOURCE          FSTYPE  OPTIONS
/mnt/data /dev/nvme0n1p11 fuseblk rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096
michael@mars:~$ grep data /etc/fstab 
LABEL=Data      /mnt/data       ntfs-3g auto            0       0

@Rello Rello added this to the 3.16.0 milestone Jan 10, 2025
@mgallien mgallien modified the milestones: 3.16.0, 3.16.1 Feb 13, 2025
@luk-brue
Copy link

I built this branch from source on Linux Mint 21.3 Cinnamon and tested it with some folders on NTFS partitions (different partition than the OS). It works sometimes, which was great! But then it stops working and does not sync new files. Either it is stuck in Offline or it is stuck in "preparing sync..." for hours and nothing happens, even though new files are in the folder. Sometimes it also says "checking folder for new files..." The only solution to make sync work again on NTFS partitions is to remove the accounts and re-add them, then it works sometimes. However, syncing a folder on the same partition as the OS, normal ext4 filesystem, is working fine.

Also weird, When I add an account, I have to authenticate once when I add it and once more when I reboot the machine for the first time afterwards.
I don't know if this is on my side (Qt communicating with keyring) or the client side.

Built with Qt 6.8.2.
I hope this little experience review will help in the developing process, you are doing an awesome job! If you have more questions, I can try to answer them.

@nilsding
Copy link
Member

Also weird, When I add an account, I have to authenticate once when I add it and once more when I reboot the machine for the first time afterwards.

this should be fixed with #7768 which was merged after this PR was created (and this branch is currently out-of-date). Should be fine on latest master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants