Open vicky-bs opened 1 year ago
Plugin should allow $user variable to be included within the mount path so each user have their own folder created
This is the point here; folder (mountpoint full path) must exist I think, it is not created.
My external mount point was /mnt/storage/nextcloud and in nextcloud under external storage configuration I provided /mnt/storage/nextcloud/$user and it show an error and doesn't accept this as a configuration. Is there another way to have this directly in he mount config file?
This is the point here; folder (mountpoint full path) must exist I think, it is not created.
Yes.
I assume that's a good hint for our documentation page https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/external_storage_configuration_gui.html#usage-of-variables-for-mount-paths and therefore moved it over here.
I'm (probably) confused, isn't the whole issue that $user should be functional/working, i.e. a "feature request", rather than a documentation issue?
Yeah, hey @kesselb I think the issue may be that it's not even possible to enter $user
on that screen right now.
It errors out in the Web UI because the check fails. I'm not even sure how the check is supposed to function when substitution is used.
Wait - I take that back. I typo my test.
@vicky-bs - You can add it as long as you make sure that, at the very least, /mnt/storage/nextcloud/<your_username>
exists so that the basic sanity check passes.
Of course for other users to be able to access their respective folders, you'll have to create every needed $user
folder within /mnt/storage/nextcloud
via whatever out-of-NC means is appropriate for your use case.
Below (ignore the first entry) are some test runs I just did:
In the /tmp/test2/$user
scenario I created folders within /tmp/test2/
for each of my existing users ahead of time to guarantee it would work (and simulate a typical situation such as mounting a remote /home
folder or whatever where there are pre-existing user files). That succeeded.
In the /tmp/test4/$user
scenario I first tried to add while /tmp/test4/
was empty and I got the red failed check error you likely saw. I then created a directory for my admin username in /tmp/test4/
and triggered a re-check. That passed and turned green.
So it seems a couple bits missing from the docs for variable substitutions:
That is not the language to go in the docs. More a note to myself or the party that does the doc PR. :)
P.S. Items 1&2 may be bypassed if using the command-line occ files_external:create
approach to provision things, but I haven't confirmed it. But given that verification is a separate command occ files_external:verify
it's a possibility.
@joshtrichards . Thank you. I was able to create the folder and then change the configuration in external storage app. There sure is an opportunity to improve here. It's either that when user add $user in external app config, the folders for each user is automatically created with the right permission OR the documentation can be improved further to highlight that the folders need to exists before add the variable in configuration. Happy to help reword the documentation on this but I must say i'm a novice :). Let me know
It'd be so nice if NC could simply check the path up until $user
and then accept it (since it knows $user
is a supported macro) to allow for much easier on-boarding when using external storage.
⚠️ This issue respects the following points: ⚠️
Bug description
When using the $user variable for external storage support. I get a red mark without anything in the logs
Steps to reproduce
Expected behavior
Plugin should allow $user variable to be included within the mount path so each user have their own folder created
Installation method
Community Docker image
Nextcloud Server version
27
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.0
Web server
Apache (supported)
Database engine version
PostgreSQL
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
No response
Additional info
No response