-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Local external storage doesn't work #11728
Comments
I am using external local storage on Nextcloud 14.0.0. - but it works for me (apache2, php7). |
I tried a bind mount today and that also does work. I did this by:
Now my Files view in the web UI looks like this: https://i.imgur.com/YxgbkrT.png Clicking on "Music" causes it to download a 0-length file. In nextcloud.log, I see this entry:
|
I upgraded to 15 beta 2 and this problem disappeared. (not ideal as half the plugins aren't ready for 15 but it works.) |
@searing: do you mean the bind mount DID NOT work? You post says:
But you report a PHP
This is
It fails for the glusterfs mounted directory. There is a second error in the nextcloud log:
This may related to a bug in PHP. |
Latest NextCloud (18.0.1) When user browses shares -> "You don't have permission to upload or create files here" There are no files. But, this is not correct! The new Readme.md file CAN be created, the error message remains. occ files:scan --path="/path/to/real/filesystem" does not work, returns user 'path' does not exist. occ files:scan --all Which takes ages!! But when it's complete the error is removed. 1: It seems the scan is not working "Check for changes on = every direct access" does not work Note: access via sftp to the same folder for the same user using a public key works without having to do the files:scan --all so it a good workround. |
Encountered this too, upgraded and no issues so far now |
Steps to reproduce
Expected behaviour
Able to view, modify, etc. files in local directory outside the main data directory
Actual behaviour
Viewing the main "Files" view of the web UI shows this (the "Music" directory is an external storage): https://i.imgur.com/jHKP85d.png
Trying to click on the folder causes my browser to try downloading the literal symlink file that Nextcloud uses.
If I click on "External Storages" on the left hand side of the Files app, and then click Music, I get a message at the top that reads: "You don't have permission to upload or create files here".
The external storage is created as editable (not read only). Here's the row from the admin External Storages page: https://i.imgur.com/r1J5Wde.png
Here's the directory listing from my user's "files" directory. Notice the symlink, which is seemingly correct, and has the right permissions:
And the permissions on the (empty) target directory:
If I sudo to http and open a shell, I can freely create and modify files, both in the target directory AND in the Nextcloud data directory going through the symlink.
As a few other notes, before I tried the external storage system, I tried simply moving the folder and putting the symlink in, hoping it would be transparent to Nextcloud. That didn't work, so I tried moving and symlinking my user's folder, and then the entire "data" directory (as described elsewhere, in this official-looking guide https://help.nextcloud.com/t/howto-change-move-data-directory-after-installation/17170 ). Nothing seemed to work, all due to permissions issues.
Finally, my system does not have SELinux enabled. The PHP process (PHP-FPM) actually runs as "http", there is no www-data user on my system (maybe that's a Debian/Ubuntu thing?). I can read/write files just fine to normal directories, without the symlink, but the symlink that seems to be used for the External Storages feature just doesn't look like it works.
At one point I also tried this:
When I did this, I could download the files in there, but trying to add any others resulted in Forbidden errors in the Windows desktop client.
I tried doing some debugging (I don't know PHP very well). I think it's because at some point it checks whether or not you can create files in the directory, which only seems to pass if the path is indeed a directory. I'm not sure if the fact that it's actually a symbolic link trips up the code because it's, strictly speaking, not a real directory, just a symlink. I'm not well-versed enough in PHP to figure out exactly where that check is in the code (I saw something about a "filetype" function returning either "dir" or "file" but when I tried to call it directly I got a PHP exception about lstat failing).
Server configuration
Operating system: Arch Linux ARM (ODROID-XU4)
Web server: nginx/1.14.0
Database: PostgreSQL 10.5
PHP version: PHP 7.2.10 (cli) (built: Sep 11 2018 09:57:13) ( NTS )
Nextcloud version: (see Nextcloud admin page) 14.0.1
Updated from an older Nextcloud/ownCloud or fresh install: Fresh install
Where did you install Nextcloud from: Arch Linux ARM official repos
Signing status:
Signing status
List of activated apps:
App list
Nextcloud configuration:
Config report
(I redacted my server's external hostname.)
Are you using external storage, if yes which one: local
Are you using encryption: no
Are you using an external user-backend, if yes which one: Nope
Client configuration
Browser: Firefox
Operating system: Windows
Logs
Web server error log
Web server error log
There are a few lines like this, but they don't seem to line up time-wise with anything in this issue. The only other lines are for other virtual hosts on the web server.
Nextcloud log (data/nextcloud.log)
Nextcloud log
There's a ton of info I would want to redact from this. Please let me know roughly what you're looking for and I can post it, but there are no errors that get printed when it fails to synchronize/write files. It seems to take "Forbidden" as a normal response not worthy of logging.The text was updated successfully, but these errors were encountered: