Error while updating 10.1.0.4 to 10.2.1

Hi everybody,

I ve just tried to update owncloud from 10.1.0.4 to 10.2.1 and failed…
Im running owncloud over centos 7 (apache, mysql)…
The process gave me this message:

The following files and directories are not writable:
/var/www/html/owncloud/core
/var/www/html/owncloud/core/Application.php
/var/www/html/owncloud/core/Command
/var/www/html/owncloud/core/Command/App
/var/www/html/owncloud/core/Command/App/CheckCode.php
/var/www/html/owncloud/core/Command/App/Disable.php
/var/www/html/owncloud/core/Command/App/Enable.php
… and 8260 more items

Im learning how to use Centos 7/ Linux and its commands so im very inexperienced in commands and other issues.
Could anybody write me the exact command to run and fix this problem please?

Regards

Argentina,

this looks like you copied the ownCloud files as another user than the webserver user and did not change the permissions.
For centos the following line should fix your permissions:
sudo chown -R apache:apache /var/www/html/owncloud/

Please take care, that those permissions remain intact.

1 Like

Hi corthlo, thank you for helping me!
I ve just run that command but nothing happens.
I have exactly the same error while i try to upgrade…
What can i do?
centos%207%20error%201

Is SELinux enabled on your server? Then this link might solve your issue: https://blog.lysender.com/2015/07/centos-7-selinux-php-apache-cannot-writeaccess-file-no-matter-what/

In short: what is the following commands’ output?
getenforce
and
ls -Z /var/www/html/owncloud

2 Likes

Hi cortho, thanks for your help!
I run those commands and this are the results:

[root@www ~]# getenforce
Enforcing

[root@www ~]# ls -Z /var/www/html/owncloud
drwxrwxrwx. apache apache system_u:object_r:httpd_sys_rw_content_t:s0 apps
-rwxrwxrwx. apache apache system_u:object_r:httpd_sys_content_t:s0 AUTHORS
-rwxrwxrwx. apache apache system_u:object_r:httpd_sys_content_t:s0 CHANGELOG.md
drwxrwxrwx. apache apache system_u:object_r:httpd_sys_rw_content_t:s0 config
-rwxrwxrwx. apache apache system_u:object_r:httpd_sys_content_t:s0 console.php
-rwxrwxrwx. apache apache system_u:object_r:httpd_sys_content_t:s0 COPYING
drwxrwxrwx. apache apache system_u:object_r:httpd_sys_content_t:s0 core
-rwxrwxrwx. apache apache system_u:object_r:httpd_sys_content_t:s0 cron.php
drwxrwx—. apache apache system_u:object_r:httpd_sys_rw_content_t:s0 data
-rwxrwxrwx. apache apache system_u:object_r:httpd_sys_content_t:s0 db_structure.xml
drwxrwxrwx. apache apache system_u:object_r:httpd_sys_content_t:s0 etc
-rwxrwxrwx. apache apache system_u:object_r:httpd_sys_content_t:s0 index.html
-rwxrwxrwx. apache apache system_u:object_r:httpd_sys_content_t:s0 index.php
drwxrwxrwx. apache apache system_u:object_r:httpd_sys_content_t:s0 lib
-rwxrwxrwx. apache apache system_u:object_r:httpd_sys_content_t:s0 occ
drwxrwxrwx. apache apache system_u:object_r:httpd_sys_content_t:s0 ocm-provider
drwxrwxrwx. apache apache system_u:object_r:httpd_sys_content_t:s0 ocs
drwxrwxrwx. apache apache system_u:object_r:httpd_sys_content_t:s0 ocs-provider
-rwxrwxrwx. apache apache system_u:object_r:httpd_sys_content_t:s0 public.php
-rwxrwxrwx. apache apache system_u:object_r:httpd_sys_content_t:s0 remote.php
drwxrwxrwx. apache apache system_u:object_r:httpd_sys_content_t:s0 resources
-rwxrwxrwx. apache apache system_u:object_r:httpd_sys_content_t:s0 robots.txt
drwxrwxrwx. apache apache system_u:object_r:httpd_sys_content_t:s0 settings
-rwxrwxrwx. apache apache system_u:object_r:httpd_sys_content_t:s0 status.php
drwxrwxrwx. apache apache system_u:object_r:httpd_sys_content_t:s0 updater
-rwxrwxrwx. apache apache system_u:object_r:httpd_sys_content_t:s0 version.php

I tried to update but the same error…

Of course, updating is still not possible because selinux prevents files from being written.

You may change the policy for your owncloud directory permanently as shown in the link from my previous post or you may temporary disable the httpd policy and renable it again. This is documented in the ownCloud documentation:

https://doc.owncloud.com/server/admin_manual/installation/selinux_configuration.html#enable-updates-via-the-web-interface

2 Likes

Thanks, it worked! but…

Some files have not passed the integrity check. Further information on how to resolve this issue can be found in our documentation.

Technical information

The following list covers which files have failed the integrity check. Please read
the previous linked documentation to learn more about the errors and how to fix
them.

Results

  • core
    • FILE_MISSING
      • README.md
      • updater/CHANGELOG.md

Raw output

Array
(
[core] => Array
(
[FILE_MISSING] => Array
(
[README.md] => Array
(
[expected] => 4886c8d58c46aba30f8577efaa04719ff315cb72d68d27374c3649ca9578baef18da9cd7165579c4425a0094d5359804c49600235cccd51737a2c9db613d69b5
[current] =>
)

                [updater/CHANGELOG.md] => Array
                    (
                        [expected] => 30634ecf94beb635907baa4c1f9a144080890f172db28ce09515b5f9e5415255bbfab51dfdcecdf5eb3a7eaf97b558463758a5222d5eca696b2f8eb50ba28451
                        [current] => 
                    )

            )

    )

)

What can i do to fix that missing files?

Did you follow the link in the error message you provided?

There they write

  • MISSING_FILE

    • The file cannot be found but has been specified within signature.json . Either a required file has been left out, or signature.json needs to be edited.

So just extract the two files from your original zip or tarball to the owncloud installation directory.

Use the forum’s search functionality! This would have shown this thread: Solved - Missing files when migrating from from 10.0.10.4 to 10.2.1.4

Edit: out of curiosity: where did you get your owncloud archive from?

2 Likes

Thanks cortho!

  1. Ive just download owncloud .zip and with winscp move those missing files to server, then i rescan and now it is fixed.

  2. This owncloud is use for educational purpose (for a little local school).
    An it company gave us free of charge a VPS to install owncloud and other things, but because i dont have any knowledge of linux i had to ask a friend to install owncloud for me in the vps.
    I think that the installation and the configurations werent succesfully done… it appears some warnings in the “security & setup warnings” section…
    If you know somebody that can help us to fix this errors please send me a message. We could pay.

Thanks,