owncloud-archive / news

:newspaper: News app for ownCloud
GNU Affero General Public License v3.0
290 stars 106 forks source link

Rmdir directory not empty #990

Closed dbeniamine closed 8 years ago

dbeniamine commented 8 years ago

I have a lot of these error messages on my log file:

rmdir(/tmp/oc_tmp_g6oC42-folder): Directory not empty at /var/www/owncloud/lib/private/helper.php#231 

I looked at the directory contents, and found that there is only one broken link that seems to belong to the news app:

# ls /tmp/oc_tmp_g6oC42-folder/
4.0K drwxr-xr-x 3 www-data www-data 4.0K May  5 00:29 news
# ls /tmp/oc_tmp_g6oC42-folder/news/vendor/bin/
total 0
0 lrwxrwxrwx 1 www-data www-data 29 May  5 00:29 picofeed -> ../fguillot/picofeed/picofeed

I removed all the contents of this directory and am currently waiting for owncloud to remove properly the tmp directory. Still there is a second oc_tmp directory that contains the exact same broken link ...

Steps to Reproduce

The first apparition of the message is right after the owncloud upgrade from 9.0.1.3 to 9.0.2.2. Also the database went down 2 minutes before the upgrade, according to my aptitude log I guess that it was restarted during another upgrade.

I am not sure here if it is linked to a cron job / if it depends of certain type of feeds, I don't know what picofeed is ...

System Information


{"reqId":"iwHfCjd8xKwRQkqbZgLC","remoteAddr":"90.42.54.18","app":"remote","message":"Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [2002] No such file or director
y","level":4,"time":"2016-05-04T09:02:25+00:00","method":"GET","url":"\/owncloud\/status.php","user":"someuser"}
{"reqId":"CrZgc9de\/ZoowP3v156i","remoteAddr":"","app":"core","message":"starting upgrade from 9.0.1.3 to 9.0.2.2","level":0,"time":"2016-05-04T09:04:06+00:00","method":"--","url":"--","user":"--"}
{"reqId":"CrZgc9de\/ZoowP3v156i","remoteAddr":"","app":"PHP","message":"rmdir(\/tmp\/oc_tmp_g6oC42-folder\/news\/vendor\/bin): Directory not empty at \/var\/www\/owncloud\/lib\/private\/helper.php#225","level":3,"time":"2016-05-04T09:05:13+00:00","method":"--","url":"--","user":"--"}
{"reqId":"CrZgc9de\/ZoowP3v156i","remoteAddr":"","app":"PHP","message":"rmdir(\/tmp\/oc_tmp_g6oC42-folder\/news\/vendor): Directory not empty at \/var\/www\/owncloud\/lib\/private\/helper.php#225","level":3,"time":"2016-05-04T09:05:13+00:00","method":"--","url":"--","user":"--"}
{"reqId":"CrZgc9de\/ZoowP3v156i","remoteAddr":"","app":"PHP","message":"rmdir(\/tmp\/oc_tmp_g6oC42-folder\/news): Directory not empty at \/var\/www\/owncloud\/lib\/private\/helper.php#225","level":3,"time":"2016-05-04T09:05:13+00:00","method":"--","url":"--","user":"--"}
{"reqId":"CrZgc9de\/ZoowP3v156i","remoteAddr":"","app":"PHP","message":"rmdir(\/tmp\/oc_tmp_g6oC42-folder\/): Directory not empty at \/var\/www\/owncloud\/lib\/private\/helper.php#231","level":3,"time":"2016-05-04T09:05:13+00:00","method":"--","url":"--","user":"--"}
{"reqId":"CrZgc9de\/ZoowP3v156i","remoteAddr":"","app":"PHP","message":"unlink(): No such file or directory at \/var\/www\/owncloud\/lib\/private\/helper.php#227","level":3,"time":"2016-05-04T09:07:24+00:00","method":"--","url":"--","user":"--"}
{"reqId":"CrZgc9de\/ZoowP3v156i","remoteAddr":"","app":"PHP","message":"rmdir(\/tmp\/oc_tmp_g6oC42-folder\/news\/vendor\/bin): Directory not empty at \/var\/www\/owncloud\/lib\/private\/helper.php#225","level":3,"time":"2016-05-04T09:07:24+00:00","method":"--","url":"--","user":"--"}
BernhardPosselt commented 8 years ago

This is caused by picofeed installing a bin script: https://github.com/fguillot/picoFeed/blob/master/composer.json#L27 which is perfectly fine. ownCloud should just remove a symlink properly when installing an app (not descend recursively however, just delete it).

Same issue as in #989 btw, please reopen this issue in core

dbeniamine commented 8 years ago

Oups sorry, I searched only on opennd issue I guess, and it seems to be already reported on core: https://github.com/owncloud/core/issues/24453