core icon indicating copy to clipboard operation
core copied to clipboard

All data from local as external storage available to user

Open mSys-mislav opened this issue 11 years ago • 5 comments

Steps to reproduce

  1. Enable external storage app
  2. Add new external storage - LOCAL
  3. Set this new local storage to the same path as you have configured datadirectory in config.php
  4. Add this storage to user XY
  5. Log in with user XY, you will see your default skeleton directory in personal files, but if you browse on the left side "External storage" you will see/have permission to access to access ALL user data

Expected behaviour

We shouldn't be able to add new local mount with the same path as we've defined datadirectory, nor should we be able to view other users files.

Actual behaviour

As mentioned above, if you browse on the left side "External storage" you will see/have permission to access to access ALL user data

Server configuration

Operating system: Debian 8

Web server: Apache

Database: MariaDB

PHP version: 5.6.12

ownCloud version: (see ownCloud admin page) 8.1.1

Updated from an older ownCloud or fresh install: fresh install

List of activated apps: Enabled:

  • activity: 2.0.1
  • encryption: 1.0.0
  • external: 1.2
  • files: 1.1.10
  • files_external: 0.2.3
  • files_locking:
  • files_pdfviewer: 0.7
  • files_sharing: 0.6.2
  • files_texteditor: 0.4
  • files_trashbin: 0.6.3
  • files_versions: 1.0.6
  • files_videoviewer: 0.1.3
  • firstrunwizard: 1.1
  • gallery: 0.6.0
  • provisioning_api: 0.2
  • templateeditor: 0.1 Disabled:
  • user_external
  • user_ldap
  • user_webdavauth
If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your ownCloud installation folder

The content of config/config.php:

If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system --public
from within your ownCloud installation folder

(side note)
$ sudo -u www-data php occ config:list system --public
  [InvalidArgumentException]                                
  There are no commands defined in the "config" namespace.  
or 

Insert your config.php content here
(Without the database password, passwordsalt and secret)
'', 'passwordsalt' => '', 'secret' => '', 'trusted_domains' => array ( 0 => '', ), 'datadirectory' => '/opt/owncloud/data', 'overwrite.cli.url' => '', 'dbtype' => 'mysql', 'version' => '8.1.1.3', 'dbname' => '', 'dbhost' => 'localhost', 'dbtableprefix' => 'oc_', 'dbuser' => '', 'dbpassword' => '', 'logtimezone' => 'UTC', 'installed' => true, 'loglevel' => 3, 'asset-pipeline.enabled' => true, 'memcache.local' => '\OC\Memcache\APCu', 'defaultapp' => 'files', 'check_for_working_htaccess' => false, 'mail_smtpmode' => 'php', 'mail_smtpsecure' => 'ssl', 'mail_smtpauth' => 1, 'enable_previews' => false, ); **Are you using external storage, if yes which one:** local/smb/sftp/... - local **Are you using encryption:** yes **Are you using an external user-backend, if yes which one:** LDAP/ActiveDirectory/Webdav/... - no external user-backend ### Client configuration **Browser:** Mozilla Firefox **Operating system:** Ubuntu 14.04 LTS Let me know if you need anything else!

mSys-mislav avatar Sep 10 '15 13:09 mSys-mislav

We shouldn't be able to add new local mount with the same path as we've defined datadirectory, nor should we be able to view other users files.

Why? Local storage is only available to the admin, who has the responsibility of who gets access to the storage. They could just as easily give access to the whole root FS...

RobinMcCorkell avatar Sep 10 '15 13:09 RobinMcCorkell

Because many users don't test this in details and they have potentially a lot of problems, since user can view all data. But for sure, it's admin's mistake, as he's only one who grant access to the same.

mSys-mislav avatar Sep 10 '15 13:09 mSys-mislav

I don't see why the Local storage type should be restricted to outside of the data directory... far more damaging things can be done (should we also restrict access to /etc? What about /tmp? And perhaps giving access to other websites installed on the same server is a security risk?). Not to mention, there are some usecases where this behaviour is actually desired.

Sorry, I just don't see this as an issue.

RobinMcCorkell avatar Sep 10 '15 13:09 RobinMcCorkell

Seconded.

LukasReschke avatar Sep 10 '15 13:09 LukasReschke

@Xenopathic I think you've explained the point with your last response, I couldn't agree more.

Kindly close the same, thanks.

mSys-mislav avatar Sep 10 '15 13:09 mSys-mislav