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

updateapp.php not working correctly with news app #24453

Closed
paroj opened this issue May 5, 2016 · 12 comments
Closed

updateapp.php not working correctly with news app #24453

paroj opened this issue May 5, 2016 · 12 comments
Labels
Milestone

Comments

@paroj
Copy link

paroj commented May 5, 2016

Steps to reproduce

  1. update the news app using the owncloud updater
  2. check the log

Expected behaviour

Temporary files correctly deleted

Actual behaviour

Temporary files not correctly deleted

Server configuration

Operating system: Ubuntu 14.04

Web server: Apache

Database:

PHP version: 7.0.5

ownCloud version: 9.0.2

Updated from an older ownCloud or fresh install: updated from 8

Where did you install ownCloud from: debian repository

Signing status (ownCloud 9.0 and above):

No errors have been found.

Are you using encryption: no

Logs

ownCloud log (data/owncloud.log)

{"reqId":"qrODXNeGf59YH0Hh67UI","remoteAddr":"192.168.178.xx","app":"PHP","message":"unlink(): No such file or directory at \/var\/www\/owncloud\/lib\/private\/helper.php#227","level":3,"time":"2016-05-05T16:36:50+02:00","method":"POST","url":"\/index.php\/settings\/ajax\/updateapp.php","user":"me"}
{"reqId":"qrODXNeGf59YH0Hh67UI","remoteAddr":"192.168.178.xx","app":"PHP","message":"rmdir(\/tmp\/oc_tmp_56egK8-folder\/news\/vendor\/bin): Directory not empty at \/var\/www\/owncloud\/lib\/private\/helper.php#225","level":3,"time":"2016-05-05T16:36:50+02:00","method":"POST","url":"\/index.php\/settings\/ajax\/updateapp.php","user":"me"}
{"reqId":"qrODXNeGf59YH0Hh67UI","remoteAddr":"192.168.178.xx","app":"PHP","message":"rmdir(\/tmp\/oc_tmp_56egK8-folder\/news\/vendor): Directory not empty at \/var\/www\/owncloud\/lib\/private\/helper.php#225","level":3,"time":"2016-05-05T16:36:50+02:00","method":"POST","url":"\/index.php\/settings\/ajax\/updateapp.php","user":"me"}
{"reqId":"qrODXNeGf59YH0Hh67UI","remoteAddr":"192.168.178.xx","app":"PHP","message":"rmdir(\/tmp\/oc_tmp_56egK8-folder\/news): Directory not empty at \/var\/www\/owncloud\/lib\/private\/helper.php#225","level":3,"time":"2016-05-05T16:36:50+02:00","method":"POST","url":"\/index.php\/settings\/ajax\/updateapp.php","user":"me"}
{"reqId":"qrODXNeGf59YH0Hh67UI","remoteAddr":"192.168.178.xx","app":"PHP","message":"rmdir(\/tmp\/oc_tmp_56egK8-folder): Directory not empty at \/var\/www\/owncloud\/lib\/private\/helper.php#231","level":3,"time":"2016-05-05T16:36:50+02:00","method":"POST","url":"\/index.php\/settings\/ajax\/updateapp.php","user":"me"}

ls /tmp/oc_tmp_56egK8-folder/news/vendor/bin/

picofeed
@ghost
Copy link

ghost commented May 5, 2016

Have noticed the same in the past but completely forgot to report it here. It seems this is caused because the vendor/bin/picofeed is a symlink to vendor/fguillot/picofeed/picofeed

@BernhardPosselt
Copy link
Contributor

I guess the install/update script does not remove symlinks proplery

@ghost
Copy link

ghost commented May 12, 2016

@paroj Btw. are you able to update the news app via the GUI at all? I'm still having the issue described in #18391 so just wondering if you're also facing the same issue?

@paroj
Copy link
Author

paroj commented May 12, 2016

the update itself succeeds - I just have to remove the /tmp/oc_tmp_56egK8-folder/news/vendor/bin/ folder manually afterwards

@PVince81
Copy link
Contributor

@VicDeo

@VicDeo
Copy link
Member

VicDeo commented Jun 23, 2016

yep. This will unlink target and not symlink itself.
https://github.com/owncloud/core/blob/stable9/lib/private/helper.php#L227

So there will be two notices:

  • while unlinking non-existing target. it is already unlinked due to $fileInfo->getRealPath(). But it depends on the order of filesystem items iterator returns so happens from time to time.
  • while rmdir on symlink parent directory

just as per #24478

Error PHP rmdir(/tmp/oc_tmp_0oiTQP-folder/news/vendor/bin): Directory not empty at /var/www/owncloud/lib/private/helper.php#225 2016-05-04T18:15:01+00:00
Error PHP unlink(): No such file or directory at /var/www/owncloud/lib/private/helper.php#227 2016-05-04T18:15:01+00:00

@VicDeo
Copy link
Member

VicDeo commented Jun 23, 2016

@PVince81 should be fixed in master with #24899
Backport changes in helper.php only?

@PVince81
Copy link
Contributor

PVince81 commented Jul 4, 2016

Fix is here #25255

@PVince81 PVince81 closed this as completed Jul 4, 2016
@Pazu
Copy link

Pazu commented Nov 8, 2016

Sorry to post in an old issue, but I've seen these messages in my log for a long time and still see them after upgrading to 9.1.1. Shouldn't these be gone as of 9.1 if this is fixed?

rmdir(/tmp/oc_tmp_XS146u-folder): Operation not permitted at /home/foo/public_html/lib/private/legacy/helper.php#218

According to my shared hosting provider:

the RM errors are not related to anything with ownCloud. you dont have access to TMP and its not needed for ownCloud

@ghost
Copy link

ghost commented Nov 8, 2016

@Pazu I think this is unrelated to this issue here. The issue discussed here was about the symlink which wasn't removed correctly caused the posted error in the initial report.

Your issue / error is different and is caused by your environment setting the /tmp folder as a temp directory for PHP. where ownCloud has no access to. For further support please use https://central.owncloud.org

@VicDeo
Copy link
Member

VicDeo commented Nov 8, 2016

@Pazu you can create a dedicated tmp for your owncloud, e.g. /home/foo/tmp and tempdirectory in config.php to use it:
https://github.com/owncloud/core/blob/stable9.1/config/config.sample.php#L1093

@lock
Copy link

lock bot commented Aug 3, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants