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

occ file:scan reports error if user never logged on #23333

Closed
danimo opened this issue Mar 16, 2016 · 8 comments
Closed

occ file:scan reports error if user never logged on #23333

danimo opened this issue Mar 16, 2016 · 8 comments

Comments

@danimo
Copy link
Contributor

danimo commented Mar 16, 2016

Steps to reproduce

  1. Create user "newlycreated"
  2. Make sure he doesn't log in
  3. run occ file:scan

Expected behaviour

System should not issue a misleading warning

Actual behaviour

occ issues: Home storage for user newlycreated not writable

Server configuration

Operating system:
Debian Jessie

Web server:
Apache 2.4
Database:
MariaDB

PHP version:
7.0.3
ownCloud version: (see ownCloud admin page)
9.0.0 from git (stable9 as of 8516831 plus custom patches)
Updated from an older ownCloud or fresh install:
upgraded from 8.2.2

Where did you install ownCloud from:
git

Signing status (ownCloud 9.0 and above):
n/a

@blizzz
Copy link
Contributor

blizzz commented Mar 16, 2016

@icewind1991 @PVince81

@PVince81
Copy link
Contributor

Ah yes, I remember have seen this before.

@PVince81
Copy link
Contributor

Need to check whether it happens with "occ files:scan --all". If yes, does it abort scanning or continues ?
If it aborts, then that's bad => high.
If it ignores it, not too bad => medium

Setting to high for now to try it out.

@PVince81 PVince81 added this to the 9.0.1-current-maintenance milestone Mar 17, 2016
@PVince81 PVince81 self-assigned this Mar 17, 2016
@danimo
Copy link
Contributor Author

danimo commented Mar 17, 2016

Need to check whether it happens with "occ files:scan --all".

Yes, it was happening with --all in the first place.

If yes, does it abort scanning or continues ?

Don't know. It happend on the last projected user...

@PVince81
Copy link
Contributor

Not too bad, I just tried the following:

  1. Create a user "user1" in the web UI but DO NOT login with that user
  2. Create a user "user2"
  3. Login as "user2" to init home
  4. run occ files:scan --all
petry:/srv/www/htdocs/owncloud # sudo -uwwwrun ./occ files:scan --all -vvv
The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see http://php.net/manual/en/book.pcntl.php

Scanning files for 3 users

Starting scan for user 1 out of 3 (admin)
        Folder /admin/
        Folder /admin/files
        File   /admin/files/welcome.txt
        Folder /admin/files/test
        Folder /admin/files/test2
        Folder /admin/cache
        Folder /admin/thumbnails
        Folder /admin/thumbnails/3
        File   /admin/thumbnails/3/2048-2048-max.png
        File   /admin/thumbnails/3/32-32.png

Starting scan for user 2 out of 3 (user1)
Home storage for user user1 not writable
Make sure you're running the scan command only as the user the web server runs as

Starting scan for user 3 out of 3 (user2)
        Folder /user2/
        Folder /user2/cache
        Folder /user2/files
        File   /user2/files/welcome.txt
        Folder /user2/thumbnails
        Folder /user2/thumbnails/16
        File   /user2/thumbnails/16/2048-2048-max.png
        File   /user2/thumbnails/16/32-32.png

+---------+-------+--------------+
| Folders | Files | Elapsed time |
+---------+-------+--------------+
| 12      | 6     | 00:00:00     |
+---------+-------+--------------+

As we can see, the home of "user1" is skipped but scanning continues.
Downgrading to sev3-medium as it's not too bad.

Then the question is what to do with such storages. Since the user did not log in they don't have a skeleton yet.

Should we trigger skeleton creation at this time ? (might be slow with many users)
Or should we just adjust the error message to say "User hasn't logged in yet, cannot scan" ?

@ghost ghost modified the milestones: 9.1-current, 9.0.1 Apr 8, 2016
@PVince81
Copy link
Contributor

@icewind1991 @mmattel didn't we fix that recently ?

@icewind1991
Copy link
Contributor

#25028

@lock
Copy link

lock bot commented Aug 4, 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 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants