This is more of a place holder for a future discussion and tidbit. I have needed the option of symlinks and fought the issue with Owncloud and Nextcloud for at least 8 years. I have yet to fully understand why this is deemed such a bad practice especially for the community edition.
For the time being I was able to temporarily solve my issue with a Bind mount. This worked and I was able to run the occ files:scan command and it updated/imported folder and files successfully.
Here is a mini tutorial I followed. I'll clean this up later.
If someone has successfully been able to use symlinks within the data directory, I'd love to hear your story and buy you coke. I've spent many hours looking for someone who has and haven't found anything viable online or in the forums. I'll even admit to asking chatgpt which said it WAS possible, but I never found any of the information useful or accurate.
Bind mounts in Linux® enable you to mount an already-mounted file system to another location within the file system. Generally, bind mounts are used when restricting the access of specified users to designated parts of a website by replicating the website's directory into a jailed user's home directory.
Configure a Bind Mount
This section provides steps for how to grant a user access to a directory by using bind mounting to bind the directory to that user's home directory.
Configure a bind mount by using the following command:
Bind mounts are not persistent when you restart your server unless you create an entry for the bind mount in your server's File Systems Table (fstab).
Add a bind mount to the File Systems Table
Add an fstab entry for the bind mount by using the following command:
If the nobootwait option is not included in the fstab entry, you see the following message in the server console:
Adding nobootwait to the options section of the fstab configuration ensures that the system boots even if the bind mount directory has been removed from the system.
No comments:
Post a Comment