Following upgrade from OwnCloud version 8 through 9, 10 and to NextCloud v12 to big surprise file/folder sharing option disappeared.
Same issue has been described here:
Throughout investigation showed that problem was somehow related to apps folder.
See at the bottom for solution.
For tests purposes below steps were taken:
- File sharing app happen to be on original install. By enabling it, as long as sharing was enabled in admin tab, files/folder view did show empty page whilst shared with me, showed nice list of shared with me folders.
Further tests by disabling sharing in Admin -> Sharing panel: “Allow apps to use the Share API” resulted in nice view of files, but no shared folders/files were present.
NOT OK – couldn’t get it working. Cleaning up DB manually didn’t help.
- Configure fresh installation of NextCloud (freshly downloaded, fresh database).
OK – everything worked. This confirmed that at least vanilla version should work fine.
- Original installation DB backup was restored to new DB.
Semi OK – some manual steps were needed, to repair installation and re-enable applications. Surprise was that file sharing app was required upgrade and was disabled.
The option 3 was the most promising and further tests were done if everything works fine.
Another element which was discovered was that shared folder ended up in my user main folder which was very inconvenient.
/config/config.php had set it to
'share_folder' => '/Shared',
Further checks of DB content revealed that there are entries pointing to my root folder. Modifying DB directly solved that problem and setting
'share_folder' => '/Shared/', solved issue for newly shared folder.
See my other post on how to update existing table for sharing. Update SQL entries
Steps to get production system working were:
- Put your system into maintenance mode. In my case I’ve blocked access to NextCloud installation based on source IP, to avoid production users interacting with system during maintenance work.
- Backup your NextCloud folder and DB.
- Install fresh NextCloud and restore config.php
- Move data folder.
- Don’t move/copy anything from apps folder.
- Repair system: ./occ maintenance:repair
- Re-enable all apps, especially files_sharing (v1.4.0).
- Disable maintenance.
- Upon first launch system will ask to upgrade missing applications and perform additional tasks. NextCloud downloads missing apps and updates them.
- Review if all apps are back and re-enabled.
- All should work fine
- Disable IP based filtering to allow production users to use the system.
Hope above helps as errors received didn’t make any sense to me.