Skip to content
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

tempdirectory at the update and after #113

Closed
Ralf99 opened this issue May 18, 2017 · 3 comments
Closed

tempdirectory at the update and after #113

Ralf99 opened this issue May 18, 2017 · 3 comments

Comments

@Ralf99
Copy link

Ralf99 commented May 18, 2017

Hi,

I have the following problem.

I updated my NC v11.0.3 (test-system) to the v12.0 beta4 on a sharehoster.

  1. I opened the "web-updater" and started him.
  2. I get the following Error

Check for expected files
The following extra files have been found:
tmp

  1. I follow the instructions from this posting (https://help.nextcloud.com/t/update-problem-check-for-expected-files/6104/18) and enter this 'tmp', to the directories.
  2. I restart the web-updater -> it works like a charm.
  3. On the new System (NC v12.0 beta4) i go to admin -> logging and find now many many Errors and Warnings :(

Error PHP opendir(/tmp): failed to open dir: Permission denied at /www/htdocs/xxxx/lib/private/TempManager.php#189
Warning no app in context Temporary directory /www/htdocs/xxxx/tmp is not present or writable 2017-05-18T17:04:00+0200
Warning no app in context Temporary directory /www/htdocs/xxxx/tmp is not present or writable 2017-05-18T17:03:29+0200
Warning no app in context Temporary directory /www/htdocs/xxxx/tmp is not present or writable 2017-05-18T17:03:00+0200
....

  1. If I look now on the ftp root i can´t find a "tmp" folder. But when i create it manually again, the Warnings and Errors disappear from the logging.

Is this normal? If NC need this temporary directory, why delete the updater then this folder?

@MorrisJobke
Copy link
Member

Is this normal? If NC need this temporary directory, why delete the updater then this folder?

because we don't expect it in the Nextcloud folder itself. Usually this is in a completely different partition of your hard disk. :/

@bpcurse
Copy link

bpcurse commented Jan 18, 2019

Same problem here with a webhoster that offers one-click install of nextcloud. They place a "tmp" directory in the nc root.
This simple install makes nextcloud available to users with almost no tech skills, but they won't be able to do updates, hence worsening security of these instances over time.

Proposal @MorrisJobke: Couldn't updater check config.php for the location of the temp dir and accept it inside the nc root if it is defined in the file?

@joshtrichards
Copy link
Member

Should probably be consolidated into #68 (which would cover this for tempdirectory - and more).

joshtrichards added a commit to joshtrichards/nc-server that referenced this issue Jun 18, 2023
* Addresses nextcloud/updater#227
* Addresses nextcloud/updater#113

If one decides to use the `tempdirectory` override, this recommends it be placed outside the NC installation directory (to clear unexpected file checks) as well as outside the document root (for security reasons).

Signed-off-by: Josh Richards <[email protected]>
@joshtrichards joshtrichards closed this as not planned Won't fix, can't repro, duplicate, stale Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants