kavitacia Posted March 29 Share Posted March 29 (edited) Hello. I updated Unride 6.9.2 to 6.11.5. Now Nextcloud writes the following message: Quote The data directory is incorrect. Make sure the ".ocdata" file is present at the root of the data directory. The data directory is not writable. Permissions can usually be fixed by giving the web server the right to write to the root directory. Refer to https://docs.nextcloud.com/server/25/go.php?to=admin-dir_permissions. I think it's a problem with the access rights to the directory, but I don't know how to fix it. Help please. [email protected]:~# ls -l /mnt/user/appdata/nextcloud/ total 104 drwxr-xr-x 1 sshd sshd 880 Dec 25 23:52 3rdparty/ -rw-r--r-- 1 sshd sshd 19327 Dec 25 23:52 AUTHORS -rw-r--r-- 1 sshd sshd 34520 Dec 25 23:52 COPYING drwxr-xr-x 1 sshd sshd 1182 Dec 25 23:53 apps/ drwxr-xr-x 1 sshd root 300 Jun 14 2020 config/ -rw-r--r-- 1 sshd sshd 4095 Dec 25 23:52 console.php drwxr-xr-x 1 sshd sshd 440 Dec 25 23:53 core/ -rw-r--r-- 1 sshd sshd 6317 Dec 25 23:52 cron.php drwxr-xr-x 1 sshd root 380 Dec 25 23:05 custom_apps/ drwxr-xr-x 1 sshd root 64 Jun 14 2020 data/ drwxr-xr-x 1 sshd sshd 10104 Dec 25 23:53 dist/ -rw-r--r-- 1 sshd sshd 156 Dec 25 23:52 index.html -rw-r--r-- 1 sshd sshd 3456 Dec 25 23:52 index.php drwxr-xr-x 1 sshd sshd 126 Dec 25 23:53 lib/ -rw-r--r-- 1 root root 0 Dec 25 23:52 nextcloud-init-sync.lock -rwxr-xr-x 1 sshd sshd 283 Dec 25 23:52 occ* drwxr-xr-x 1 sshd sshd 18 Dec 25 23:53 ocm-provider/ drwxr-xr-x 1 sshd sshd 50 Dec 25 23:53 ocs/ drwxr-xr-x 1 sshd sshd 18 Dec 25 23:53 ocs-provider/ -rw-r--r-- 1 sshd sshd 3139 Dec 25 23:52 public.php -rw-r--r-- 1 sshd sshd 5549 Dec 25 23:52 remote.php drwxr-xr-x 1 sshd sshd 158 Dec 25 23:53 resources/ -rw-r--r-- 1 sshd sshd 26 Dec 25 23:52 robots.txt -rw-r--r-- 1 sshd sshd 2452 Dec 25 23:52 status.php drwxr-xr-x 1 sshd root 26 Jun 14 2020 themes/ -rw-r--r-- 1 sshd sshd 383 Dec 25 23:53 version.php [email protected]:~# Edited March 29 by kavitacia Quote Link to comment
Tharnax Posted March 31 Share Posted March 31 (edited) Hoping for some support with NextCloud. I've been watching and following SpaceInvader One's tutorial on setting up NextCloud on Unraid - Part 1. Everything was working as per the step by step process. I completed the install of MariaDB, installed NextCloud, confirmed it was running set it up on the MariaDB,, setup a user, etc.. All working great. I got to about 20.50 in the lined video where the next step is to configure NextCloud to work with the personal domain. I made all the necessary configuration changes in the config.php file and saved the file. I restarted Nextcloud container and now I am recieving the following error msg in the log file which I had not received previously. Wondering if anyone had any thoughts / recommendations? PHP Fatal error: Uncaught Error: Typed static property OC::$server must not be accessed before initialization in /config/www/nextcloud/cron.php:192 Stack trace: #0 {main} thrown in /config/www/nextcloud/cron.php on line 192 I attempted to look up a potential fix but honestly this is way above my head which is why I'm reaching out to the experts on this community to see if you have any advise, for a noob. Thanks! Please disregard, after opening the config.php file in a different application I see where I omitted a comma in one of the statements. I didn't want to delete this post incase someone comes across it in the future. Edited March 31 by Tharnax Found and resolved the issue. 1 Quote Link to comment
blaine07 Posted March 31 Share Posted March 31 31 minutes ago, Tharnax said: Hoping for some support with NextCloud. I've been watching and following SpaceInvader One's tutorial on setting up NextCloud on Unraid - Part 1. Everything was working as per the step by step process. I completed the install of MariaDB, installed NextCloud, confirmed it was running set it up on the MariaDB,, setup a user, etc.. All working great. I got to about 20.50 in the lined video where the next step is to configure NextCloud to work with the personal domain. I made all the necessary configuration changes in the config.php file and saved the file. I restarted Nextcloud container and now I am recieving the following error msg in the log file which I had not received previously. Wondering if anyone had any thoughts / recommendations? PHP Fatal error: Uncaught Error: Typed static property OC::$server must not be accessed before initialization in /config/www/nextcloud/cron.php:192 Stack trace: #0 {main} thrown in /config/www/nextcloud/cron.php on line 192 I attempted to look up a potential fix but honestly this is way above my head which is why I'm reaching out to the experts on this community to see if you have any advise, for a noob. Thanks! Please disregard, after opening the config.php file in a different application I see where I omitted a comma in one of the statements. I didn't want to delete this post incase someone comes across it in the future. Good work figuring it out; about the story of my life too — I make a post and wham it hits me lol 1 Quote Link to comment
cat2devnull Posted March 31 Share Posted March 31 2 hours ago, Tharnax said: Please disregard, after opening the config.php file in a different application I see where I omitted a comma in one of the statements. The advantage of using something like VS Code to edit config files. As soon as you stuff up the syntax it's really obvious. Now don't get me wrong, mad respect for the vi diehards but I'd rather not waste time on silly errors. 1 Quote Link to comment
JonathanM Posted March 31 Share Posted March 31 8 hours ago, cat2devnull said: The advantage of using something like VS Code to edit config files. As soon as you stuff up the syntax it's really obvious. Now don't get me wrong, mad respect for the vi diehards but I'd rather not waste time on silly errors. Some people code so much they see the highlighting even when they use vi, like the matrix. 2 Quote Link to comment
Tharnax Posted March 31 Share Posted March 31 8 hours ago, cat2devnull said: The advantage of using something like VS Code to edit config files. As soon as you stuff up the syntax it's really obvious. Now don't get me wrong, mad respect for the vi diehards but I'd rather not waste time on silly errors. You are correct, I couldn't see the issue reviewing the code via terminal, however, when I opened it via the Shares (Dynamic File Manager plug-in - although don't quote me that might not be how it worked it might be Unraid OOTB capability), I was able to navigate through Shares to the Nexcloud config folder and open the config.php file where there was a clear red X beside the line with an issue. Upon further review, I identified it was the line above which was missing the comma at the end. Such as small difference but that "tool" / capability helped me resolve the issue but highlighting the area of the issue in the code. If I was to make a recommendation to Spaceinvader One, it would be to utilize this capability in this tutorial videos because then any manual updates a user is making it would be more apparent if they make a minor mistake while following along. Thanks all for your feedback. Quote Link to comment
Rayce185 Posted April 3 Share Posted April 3 The Update yesterday messed up my configuration and WebUI gives me following error message: Internal Server Error The server was unable to complete your request. If this happens again, please send the technical details below to the server administrator. More details can be found in the server log. Technical details Remote Address: xxx.xxx.xxx.xxx Request ID: PGYCL1eLXBpQyWYQvrTH Log: usermod: no changes ─────────────────────────────────────── ██╗ ███████╗██╗ ██████╗ ██║ ██╔════╝██║██╔═══██╗ ██║ ███████╗██║██║ ██║ ██║ ╚════██║██║██║ ██║ ███████╗███████║██║╚██████╔╝ ╚══════╝╚══════╝╚═╝ ╚═════╝ Brought to you by linuxserver.io ─────────────────────────────────────── To support LSIO projects visit: https://www.linuxserver.io/donate/ ─────────────────────────────────────── GID/UID ─────────────────────────────────────── User UID: 99 User GID: 100 ─────────────────────────────────────── using keys found in /config/keys **** The following active confs have different version dates than the samples that are shipped. **** **** This may be due to user customization or an update to the samples. **** **** You should compare the following files to the samples in the same folder and update them. **** **** Use the link at the top of the file to view the changelog. **** ┌────────────┬────────────┬────────────────────────────────────────────────────────────────────────┐ │ old date │ new date │ path │ ├────────────┼────────────┼────────────────────────────────────────────────────────────────────────┤ │ 2022-08-20 │ 2023-03-21 │ /config/nginx/site-confs/default.conf │ └────────────┴────────────┴────────────────────────────────────────────────────────────────────────┘ [custom-init] No custom files found, skipping... [ls.io-init] done. The docker app worked flawlessly before (last checked Saturday April 1st), trying to access the docker webUI now doesn't work anymore. Is there any way to fix this or to revert back to the previous version? Quote Link to comment
Avsynthe Posted April 7 Share Posted April 7 (edited) Hey all, So I'm trying to set up Recognize. I'd like to run it without Tensorflow WASM mode as I understand Video tagging is not available with that setting. Under Tensorflow WASM mode, it reads: Could not check whether your machine supports native TensorFlow operation. And with it disabled, under Node.js it reads: Could not load libtensorflow in Node.js. You can try to manually install libtensorflow or run in WASM mode. Under that is the note: If the shipped Node.js binary doesn't work on your system for some reason you can set the path to a custom node.js binary. Currently supported is Node v14.17 and newer v14 releases. I'd also like to run Tensorflow GPU mode, so I'd like to know if GPU passthrough works in the traditional sense with the --runtime=nvidia extra parameters and the NVIDIA_VISIBLE_DEVICES variable set. Thanks in advance! Edited April 7 by Avsynthe Quote Link to comment
Masterwishx Posted April 7 Share Posted April 7 @Толете Thanks for your help with Security headers on Cloudflare . A+ is on all my domains in https://securityheaders.com/ Just wanted to ask about ' upgrade-insecure-requests ' is it safe to use only this header ? after searched and tryed some header found very difficult to get right headers and not block some stuff in nextcloud and other domains ,also found tool CSP Generator for chrome but still trying ... Also not really found what the (interest-cohort=()) mean ? Quote Link to comment
Masterwishx Posted April 7 Share Posted April 7 (edited) From : https://observatory.mozilla.org/ Edited April 7 by Masterwishx Quote Link to comment
maxkra Posted April 7 Share Posted April 7 Hi All, Can anyone please help with updating the nextcloud version Tried everything, UI, CLI, deteling the updater-xxxxx folder, etc. Nothing helped, nextcloud UI returns: "Update in process" Updater returns: "Step 6 is currently in process. Please reload this page later." Error: [ ] Extracting ...PHP Warning: require(/config/www/nextcloud/updater/../version.php): Failed to open stream: No such file or directory in phar:///config/www/nextcloud/updater/updater.phar/lib/Updater.php on line 676 PHP Fatal error: Uncaught Error: Failed opening required '/config/www/nextcloud/updater/../version.php' (include_path='.:/usr/share/php81') in phar:///config/www/nextcloud/updater/updater.phar/lib/Updater.php:676 Stack trace: #0 phar:///config/www/nextcloud/updater/updater.phar/lib/Updater.php(713): NC\Updater\Updater->getVersionByVersionFile() #1 phar:///config/www/nextcloud/updater/updater.phar/lib/UpdateCommand.php(372): NC\Updater\Updater->extractDownload() #2 phar:///config/www/nextcloud/updater/updater.phar/lib/UpdateCommand.php(233): NC\Updater\UpdateCommand->executeStep() #3 phar:///config/www/nextcloud/updater/updater.phar/vendor/symfony/console/Command/Command.php(256): NC\Updater\UpdateCommand->execute() #4 phar:///config/www/nextcloud/updater/updater.phar/vendor/symfony/console/Application.php(820): Symfony\Component\Console\Command\Command->run() #5 phar:///config/www/nextcloud/updater/updater.phar/vendor/symfony/console/Application.php(187): Symfony\Component\Console\Application->doRunCommand() #6 phar:///config/www/nextcloud/updater/updater.phar/vendor/symfony/console/Application.php(118): Symfony\Component\Console\Application->doRun() #7 phar:///config/www/nextcloud/updater/updater.phar/updater.php(10): Symfony\Component\Console\Application->run() #8 /config/www/nextcloud/updater/updater.phar(14): require('...') #9 {main} thrown in phar:///config/www/nextcloud/updater/updater.phar/lib/Updater.php on line 676 Quote Link to comment
nraygun Posted April 7 Share Posted April 7 I just recently updated the Nextcloud, Maria, and Swag containers on my 6.11.5 unRaid server. Everything seemed to go OK. I noticed today that when I tried to sync my iPhone, I got a "503 server temporarily unavailable". After looking around at logs and such, it seemed to correct itself and now files are syncing. Should I be concerned? Any ideas why I got this 503 error? Maybe a drive was spun down or something? Quote Link to comment
SteSto86 Posted April 8 Share Posted April 8 I made a separat thread with a solution for permission problems when you use external storages because I find it particulary hard to find something even with the search bar in this long thread. But if somebody is better at searching than me, I repost it here: Quote Link to comment
Tolete Posted April 9 Share Posted April 9 (edited) On 4/7/2023 at 1:04 PM, Masterwishx said: @Толете Thanks for your help with Security headers on Cloudflare . A+ is on all my domains in https://securityheaders.com/ Just wanted to ask about ' upgrade-insecure-requests ' is it safe to use only this header ? after searched and tryed some header found very difficult to get right headers and not block some stuff in nextcloud and other domains ,also found tool CSP Generator for chrome but still trying ... Also not really found what the (interest-cohort=()) mean ? The 'upgrade-insecure-requests' header instructs the browser to automatically upgrade HTTP requests to HTTPS. This is a useful security measure to protect against man-in-the-middle (MITM) attacks and mixed content vulnerabilities. However, using this header alone is not enough to provide full Content Security Policy protection for your website. Content Security Policy (CSP) is a security standard designed to mitigate the risk of cross-site scripting (XSS), clickjacking, and other code injection attacks. It is recommended to use a properly configured CSP in addition to the 'upgrade-insecure-requests' header to provide a more comprehensive security posture for your website. Regarding the 'interest-cohort=()' directive, it is a new feature introduced by Google to combat online tracking by preventing websites from accessing a user's unique identifier or "cohort" information. The cohort information is used by Google to group similar users together for interest-based advertising. By adding 'interest-cohort=()' to your CSP, you are telling the browser to disallow the use of this feature, which could help protect user privacy. However, this directive is not yet widely supported by all browsers, and its impact on website functionality is still being studied. On 4/7/2023 at 1:06 PM, Masterwishx said: From : https://observatory.mozilla.org/ In .htaccess file: # Content Security Policy (CSP) Header always set Content-Security-Policy "default-src 'none'; frame-ancestors 'none'; connect-src 'self'; font-src 'self'; img-src 'self'; manifest-src 'self'; script-src 'self'; style-src 'self';" In default.conf file: # Content Security Policy (CSP) add_header Content-Security-Policy "default-src 'none'; frame-ancestors 'none'; connect-src 'self'; font-src 'self'; img-src 'self'; manifest-src 'self'; script-src 'self'; style-src 'self';" always; in cloudflare, modify the values for 'Content-Security-Policy' with: default-src 'none'; frame-ancestors 'none'; connect-src 'self'; font-src 'self'; img-src 'self'; manifest-src 'self'; script-src 'self'; style-src 'self'; It is possible that this can break some of your subdomains ,those subdomain websites are using external resources (such as scripts, stylesheets, or images) that are not hosted on your domain. In this case, you may need to add additional directives to your CSP to allow those external resources. To debug this issue, you can use the browser console to see which resources are being blocked by the CSP, and adjust the CSP directives accordingly. You can also use a CSP reporting tool (such as the one provided by Google) to get more detailed reports on CSP violations. In general, it is important to be careful when implementing CSP, as it can have unintended consequences if not done properly. It is recommended to start with a more permissive policy (such as "default-src 'self'") and gradually tighten it as needed, while monitoring for any issues. i would recommend just going with "upgrade-insecure-requests" to keep it from breaking other sites/apps you maybe running. Edited April 9 by Tolete 1 Quote Link to comment
ffhelllskjdje Posted April 9 Share Posted April 9 (edited) On 3/21/2023 at 12:30 PM, Tolete said: after upgrading to NC 26.0.0 Administration settings > Overview error- The "X-Robots-Tag" HTTP header is not set to "noindex, nofollow". This is a potential security or privacy risk, as it is recommended to adjust this setting accordingly. The Fix: update [line 54] on your default.conf file appdata > nextcloud > nginx > site-confs > default.conf from add_header X-Robots-Tag "none" always; to add_header X-Robots-Tag "noindex, nofollow" always; Restart container. Still getting this warning even though i updated default.conf and .htacces and restarting container on 25.0.5 Here's default.conf # The settings allows you to optimize the HTTP2 bandwitdth. # See https://blog.cloudflare.com/delivering-http-2-upload-speed-improvements/ # for tunning hints client_body_buffer_size 512k; # HTTP response headers borrowed from Nextcloud `.htaccess` add_header Referrer-Policy "no-referrer" always; add_header X-Content-Type-Options "nosniff" always; add_header X-Download-Options "noopen" always; add_header X-Frame-Options "SAMEORIGIN" always; add_header X-Permitted-Cross-Domain-Policies "none" always; add_header X-Robots-Tag "noindex, nofollow" always; add_header X-XSS-Protection "1; mode=block" always; # Remove X-Powered-By, which is an information leak fastcgi_hide_header X-Powered-By; here's .htaccess <IfModule mod_env.c> # Add security and privacy related headers # Avoid doubled headers by unsetting headers in "onsuccess" table, # then add headers to "always" table: https://github.com/nextcloud/server/pull/19002 Header onsuccess unset Referrer-Policy Header always set Referrer-Policy "no-referrer" Header onsuccess unset X-Content-Type-Options Header always set X-Content-Type-Options "nosniff" Header onsuccess unset X-Frame-Options Header always set X-Frame-Options "SAMEORIGIN" Header onsuccess unset X-Permitted-Cross-Domain-Policies Header always set X-Permitted-Cross-Domain-Policies "none" Header onsuccess unset X-Robots-Tag Header always set X-Robots-Tag "noindex, nofollow" Header onsuccess unset X-XSS-Protection Header always set X-XSS-Protection "1; mode=block" SetEnv modHeadersAvailable true </IfModule> Edited April 9 by ffhelllskjdje 1 Quote Link to comment
Masterwishx Posted April 9 Share Posted April 9 13 hours ago, Tolete said: i would recommend just going with "upgrade-insecure-requests" to keep it from breaking other sites/apps you maybe running. Thanks for explaining, I used chrome extension to generate CSP for nextcloud with 'self' and all other parameters but only in cloudflare not in nextcloud nginx. So breaked some stuff. Of course used console for check it. Also using Matomo + Cloudflare app matomo for Analytics so it's a little harder for setup becose external js. So leaved "upgrade-insecure-requests" for now but will check you example and will check it again. 1 Quote Link to comment
gevsan Posted April 12 Share Posted April 12 Hello, I have problems with updating nextcloud. Im trying to manual upgrade using occ. I get this message and i don't know how to change the permissions. I was trying to figure it out from some of the posts above but I don't understand how i should change it. My Repository is linuxserver/nextcloud Im getting this error: docker exec -it nextcloud occ upgrade Nextcloud or one of the apps require upgrade - only a limited number of commands are available You may use your browser or the occ upgrade command to do the upgrade Cannot write into "config" directory. This can usually be fixed by giving the web server write access to the config directory. See https://docs.nextcloud.com/server/26/go.php?to=admin-dir_permissions. Or, if you prefer to keep config.php file read only, set the option "config_is_read_only" to true in it. See https://docs.nextcloud.com/server/26/go.php?to=admin-config Cannot write into "apps" directory. This can usually be fixed by giving the web server write access to the apps directory or disabling the App Store in the config file. An unhandled exception has been thrown: Exception: Environment not properly prepared. in /config/www/nextcloud/lib/private/Console/Application.php:167 Stack trace: #0 /config/www/nextcloud/console.php(99): OC\Console\Application->loadCommands() #1 /config/www/nextcloud/occ(11): require_once('...') Quote Link to comment
squarebob Posted April 12 Share Posted April 12 @gevsan It is probably an issue with file owner. In you nextcloud appdata folder you can check it by doing: ls -la it should say "nobody users" as owner. If it dosnt, you can run: chown nobody:users -R * then re-run the update command Quote Link to comment
gevsan Posted April 12 Share Posted April 12 3 hours ago, squarebob said: @gevsan It is probably an issue with file owner. In you nextcloud appdata folder you can check it by doing: ls -la it should say "nobody users" as owner. If it dosnt, you can run: chown nobody:users -R * then re-run the update command I will try this. Just a noobish question.. I assume you mean to do this through the terminal? How do i cd into the directory? Quote Link to comment
squarebob Posted April 12 Share Posted April 12 You could use the terminal in web gui (from the row on the top right in gui), then cd /mnt/user/appdata/nextcloud/ Quote Link to comment
gevsan Posted April 13 Share Posted April 13 10 hours ago, squarebob said: You could use the terminal in web gui (from the row on the top right in gui), then cd /mnt/user/appdata/nextcloud/ Thanks! I tried ls -la and I had no owner. So i typed chown nobody:users -R * and it still doesn't give me owner. Below is the output after I typed "chown nobody:users -R *" [email protected]:/mnt/user/appdata/nextcloud# ls -la total 145856 drwxrwxrwx 1 nobody users 192 Apr 12 09:34 ./ drwxrwxrwx 1 65534 users 606 Mar 29 10:56 ../ drwxrwxrwx 1 nobody users 20 Jan 24 2022 .cache/ -rw-r--r-- 1 nobody users 28 Oct 19 17:01 .migrations -rw------- 1 nobody users 1024 Apr 10 19:39 .rnd drwxrwxrwx 1 nobody users 8 Apr 13 07:54 crontabs/ drwxr-xr-x 1 nobody users 0 Feb 27 12:51 custom-cont-init.d/ drwxr-xr-x 1 nobody users 0 Feb 27 12:51 custom-services.d/ drwxrwxrwx 1 nobody users 32 Jan 24 2022 keys/ -rw-r--r-- 1 nobody users 149346219 Apr 12 09:34 latest.tar.bz2 drwxrwxrwx 1 nobody users 48 Apr 13 02:00 log/ drwxrwxrwx 1 nobody users 212 Apr 13 07:54 nginx/ drwxrwxrwx 1 nobody users 44 Jan 24 2022 php/ drwxrwxrwx 1 nobody users 70 Apr 13 07:52 www/ Quote Link to comment
squarebob Posted April 14 Share Posted April 14 Your output looks correct now. Did you try and run the update again? Quote Link to comment
gevsan Posted April 14 Share Posted April 14 1 hour ago, squarebob said: Your output looks correct now. Did you try and run the update again? Yes I did. I get this message: [email protected]:~# docker exec -it nextcloud occ upgrade Nextcloud or one of the apps require upgrade - only a limited number of commands are available You may use your browser or the occ upgrade command to do the upgrade Cannot write into "config" directory. This can usually be fixed by giving the web server write access to the config directory. See https://docs.nextcloud.com/server/26/go.php?to=admin-dir_permissions. Or, if you prefer to keep config.php file read only, set the option "config_is_read_only" to true in it. See https://docs.nextcloud.com/server/26/go.php?to=admin-config Cannot write into "apps" directory. This can usually be fixed by giving the web server write access to the apps directory or disabling the App Store in the config file. An unhandled exception has been thrown: Exception: Environment not properly prepared. in /config/www/nextcloud/lib/private/Console/Application.php:167 Stack trace: #0 /config/www/nextcloud/console.php(99): OC\Console\Application->loadCommands() #1 /config/www/nextcloud/occ(11): require_once('...') #2 {main}[email protected]:~# Quote Link to comment
gevsan Posted April 14 Share Posted April 14 1 hour ago, squarebob said: Your output looks correct now. Did you try and run the update again? I get the same message when im trying to docker exec -it nextcloud occ maintenance:mode --off I don't know what to do Quote Link to comment
gevsan Posted April 17 Share Posted April 17 After i typed chown nobody:users -R * Some of my folders changed owner to "UNKNOWN" I also lost my VMs somehow... Quote Link to comment
Recommended Posts
Posted by Squid,
1 reaction
Go to this post
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.