You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nextcloud is connected to S3. When copying files using aws s3 php sdk in a directory bucket,Nextcloud does not see them. But if you look through the content of S3 Browser, everything is there. If the files to burn through nextcloud, no problem. What could be the problem? Some kind of analogue occ filesystem_external:scan ?
ps: Premissions is full.
ps2: Directory and files visible if create path with step by step
league\flysystem adapter s3
$fs_s3->createDir("../dir1");
$fs_s3->createDir("../dir1/subdir2");
$fs_s3->createDir("../dir1/subdir2/subdir3/");
$fs_s3->write("../dir1/subdir2/subdir3/test.txt");
all well and nextcloud displays file
if create file as $fs_s3->write("../dir2/subdir5/subdir6/test.txt")
the file is created but nextcloud does not display (s3 browser sees it)
For test: added
file_put_contents ('dir to file test',print_r($object,true),FILE_APPEND); 240 line opendir() function
/apps/file_external/lib/Lib/Storage/AmazonS3.php.
result - directory present. NC doesn't display them.
for some reason, the function filetype($path) AmazonS3.php return false on 'dir4'
$this->getConnection()->doesObjectExist($this->bucket,$path.'/') return false, but true for subdir and dir created with NC
NC log:
Debug OC\Files\Cach.. !!! Path 'dir4' is not accessible or present !!!
Why?
I'm having the exact same issue (NC 12.0.3). I do have the Check for changes: Once every direct access like @nickvergessen mentioned, which makes access much slower, but I do get to see the files/dirs I create straight in S3.
However, a whole tree that I synced (i.e. aws s3 sync ...) from a different bucket goes unnoticed in NC.
If I add new files to one of those ignored folders, nothing changes.
If I move one of those folders under another one previously created from S3 (and present in NC), still not visible.
If I copy files inside one of the invisible folders into a visible one, they show up fine.
@ldapomni I've spotted the filetype() function in file /var/www/nextcloud/apps/files_external/lib/Lib/Storage/AmazonS3.php
I can't reproduce the problem with master (to be NC13) and amazon S3, when creating a folder and adding a file to it trough the aws console, and running occ files:scan it properly detects the newly added folder and file.
Can anyone experiencing this problem try either the lastest NC13 beta (as always when using beta software: backup) or 12.0.4 which should include the same s3 changes.
Same problem here, I work normally with S3 folder/files created through NC or directly via AWS S3 GUI, but not with files uploaded with the aws cli. I believe it's somehow connected to the error I keep seeing in the log:
Unfortunately, I don't have a choice in the platform I use. Two weeks ago my client was mandated to use Heroku-Shield in order to meet HIPPA Compliance. Since Heroku uses a ephemeral disk platform, S3 was our only storage option that met HIPPA Compliancy for our client.
I think the cleanest way is to write the files to s3 through nextcloud. In this case you can use scan never.
Tried copying relatively large dirs from local disk to S3 with nextcloud. Half of folders are not visible, although copied fine. Need to enable rescan again.
I can confirm the patch mentioned above resolved the issue for me. I'm running nextcloud 16.0.1 and using Digital Ocean spaces for external storage, with folders/files populated using rclone directly to DO spaces. I basically just downloaded the modified AmazonS3.php file into apps/files_external/lib/Lib/Storage/ and then re-ran php occ files:scan <user> --path=/<user>/files/<name of the external folder>. I think php occ files:scan --all might have worked as well though. Before doing that I had the same issue as many others, where none of the directories populated by rclone were showing up in nextcloud.
@kesselb wrote, "@sbw Sounds good to me. Would you mind to create a new enhancement issue for this? (I think it should be like that maybe something broken)."
Sorry, I can't tell whether that pertains to the original issue (S3 external storage stuff never shows up in Nextcloud) or my off-topic observation that "S3 external storages are basically unusable, even when they're working. They're just too slow."
I hope it's the latter. I hope you're suggesting I create an "enhancement issue" to make S3 external storage fast enough to be usable. If that's what you're suggesting, I'll do that when I have time. (It's not an enhancement, really, but a defect, in my opinion: I believe Nextcloud is meant to immediately display the information it already has from a previous scan. I don't know what Nextcloud is doing instead, but whatever it is, it can't be the intended behavior.)
hey @alexklibisz i was trying to follow what you did but I couldn't modify or download updated AmazonS3.php due to read-only file system. How did you bypass it?
hey @alexklibisz i was trying to follow what you did but I couldn't modify or download updated AmazonS3.php due to read-only file system. How did you bypass it?
@hasangokdag If you are using the snap package applying this patch is not possible.
On Sat, Jun 22, 2019, 06:42 Daniel Kesselberg ***@***.***> wrote:
S3 external storages are basically unusable, even when they're working.
They're just too slow.
@sbw <https://github.com/sbw> this one.
hey @alexklibisz <https://github.com/alexklibisz> i was trying to follow
what you did but I couldn't modify or download updated AmazonS3.php due to
read-only file system. How did you bypass it?
@hasangokdag <https://github.com/hasangokdag> If you are using the snap
package applying this patch is not possible.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6954?email_source=notifications&email_token=AB5E27FS73YARJP7HA6SH2LP3X6Z7A5CNFSM4EAXSQC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYKGWDA#issuecomment-504654604>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB5E27DY7ANRGFACFPB4YRTP3X6Z7ANCNFSM4EAXSQCQ>
.
Activity
ldapomni commentedon Oct 25, 2017
ps: Premissions is full.
ps2: Directory and files visible if create path with step by step
league\flysystem adapter s3
$fs_s3->createDir("../dir1");
$fs_s3->createDir("../dir1/subdir2");
$fs_s3->createDir("../dir1/subdir2/subdir3/");
$fs_s3->write("../dir1/subdir2/subdir3/test.txt");
all well and nextcloud displays file
if create file as $fs_s3->write("../dir2/subdir5/subdir6/test.txt")
the file is created but nextcloud does not display (s3 browser sees it)
nickvergessen commentedon Oct 25, 2017
So you are uploading files directly to S3 and not through Nextcloud?
If so, in the options of the external storage definition there is a dropdown with different options:
ldapomni commentedon Oct 26, 2017
Options "Check for changes" set.
also php function aws s3 sdk $cont=$fs_s3->ListContents('',true); work fine and return list of items.
when NC refers to the directory in ceph radosgw log shows that reading the contents of the directory is, but for some reason, NC doesn't display them
ldapomni commentedon Oct 26, 2017
For test: added
file_put_contents ('dir to file test',print_r($object,true),FILE_APPEND); 240 line opendir() function
/apps/file_external/lib/Lib/Storage/AmazonS3.php.
result - directory present. NC doesn't display them.
dir4 and subdir write external scripts
ldapomni commentedon Oct 26, 2017
for some reason, the function filetype($path) AmazonS3.php return false on 'dir4'
$this->getConnection()->doesObjectExist($this->bucket,$path.'/') return false, but true for subdir and dir created with NC
NC log:
Debug OC\Files\Cach.. !!! Path 'dir4' is not accessible or present !!!
Why?
ldapomni commentedon Oct 26, 2017
If use code from league\flysystem AwS3Adapter.php to determine directory -
and change AmazonS3.php function filetype (file/dir)
work is ok.
default50 commentedon Nov 19, 2017
I'm having the exact same issue (NC 12.0.3). I do have the
Check for changes: Once every direct accesslike @nickvergessen mentioned, which makes access much slower, but I do get to see the files/dirs I create straight in S3.However, a whole tree that I synced (i.e.
aws s3 sync ...) from a different bucket goes unnoticed in NC.@ldapomni I've spotted the
filetype()function in file/var/www/nextcloud/apps/files_external/lib/Lib/Storage/AmazonS3.phpHowever, I'm not sure which changes I should made based on your prior comment to test. Also, how to debug this further and gather the needed info?
MorrisJobke commentedon Dec 18, 2017
cc @icewind1991
icewind1991 commentedon Dec 19, 2017
I can't reproduce the problem with master (to be NC13) and amazon S3, when creating a folder and adding a file to it trough the aws console, and running
occ files:scanit properly detects the newly added folder and file.Can anyone experiencing this problem try either the lastest NC13 beta (as always when using beta software: backup) or 12.0.4 which should include the same s3 changes.
ldapomni commentedon Feb 14, 2018
After update to NC13, problem still exists.
@sporykhin some error after occ files:scan.
velimirg commentedon Feb 21, 2018
Same problem here, I work normally with S3 folder/files created through NC or directly via AWS S3 GUI, but not with files uploaded with the aws cli. I believe it's somehow connected to the error I keep seeing in the log:
kruffin commentedon Mar 9, 2018
I have a very similar error when trying to delete a folder from an S3 bucket within NC.
Nextcloud 12.0.5
32 remaining items
HLFH commentedon Apr 14, 2019
I had the same issue with S3 DigitalOcean Spaces & Nextcloud, so to make Nextcloud efficient again, I had to switch to DO Block Storage.
wanchic commentedon Apr 15, 2019
Unfortunately, I don't have a choice in the platform I use. Two weeks ago my client was mandated to use Heroku-Shield in order to meet HIPPA Compliance. Since Heroku uses a ephemeral disk platform, S3 was our only storage option that met HIPPA Compliancy for our client.
dimm0 commentedon Apr 16, 2019
@kesselb
Tried copying relatively large dirs from local disk to S3 with nextcloud. Half of folders are not visible, although copied fine. Need to enable rescan again.
So it's not a solution...
kesselb commentedon Apr 16, 2019
@dimm0 This might be something for another issue. The case here with the directory support will be fixed soon.
@sbw Sounds good to me. Would you mind to create a new enhancement issue for this? (I think it should be like that maybe something broken).
JarbyDev commentedon May 13, 2019
I applied patch https://github.com/nextcloud/server/compare/bugfix/6954/scan-external-s3 and Fixed my Issue. I Running Nextcloud 15.0.7
Thank you
imxLucid commentedon May 21, 2019
still broken in 16.0.1 it seems but the patch still fixes it :(
alexklibisz commentedon May 27, 2019
I can confirm the patch mentioned above resolved the issue for me. I'm running nextcloud 16.0.1 and using Digital Ocean spaces for external storage, with folders/files populated using rclone directly to DO spaces. I basically just downloaded the modified AmazonS3.php file into
apps/files_external/lib/Lib/Storage/and then re-ranphp occ files:scan <user> --path=/<user>/files/<name of the external folder>. I thinkphp occ files:scan --allmight have worked as well though. Before doing that I had the same issue as many others, where none of the directories populated by rclone were showing up in nextcloud.sbw commentedon May 30, 2019
@kesselb wrote, "@sbw Sounds good to me. Would you mind to create a new enhancement issue for this? (I think it should be like that maybe something broken)."
Sorry, I can't tell whether that pertains to the original issue (S3 external storage stuff never shows up in Nextcloud) or my off-topic observation that "S3 external storages are basically unusable, even when they're working. They're just too slow."
I hope it's the latter. I hope you're suggesting I create an "enhancement issue" to make S3 external storage fast enough to be usable. If that's what you're suggesting, I'll do that when I have time. (It's not an enhancement, really, but a defect, in my opinion: I believe Nextcloud is meant to immediately display the information it already has from a previous scan. I don't know what Nextcloud is doing instead, but whatever it is, it can't be the intended behavior.)
hasangokdag commentedon Jun 22, 2019
hey @alexklibisz i was trying to follow what you did but I couldn't modify or download updated AmazonS3.php due to read-only file system. How did you bypass it?
kesselb commentedon Jun 22, 2019
@sbw this one.
@hasangokdag If you are using the snap package applying this patch is not possible.
alexklibisz commentedon Jun 22, 2019
crypdick commentedon Oct 31, 2019
For those like me using snap and impatient, you can upgrade to Nextcloud 17: