New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 640579 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Aug 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocked on:
issue 635601

Blocking:
issue 629945



Sign in to add a comment

External device not shown as read-only when mounted read-only by policy

Project Member Reported by yamaguchi@chromium.org, Aug 24 2016

Issue description

Chrome OS Version: ToT

Steps To Reproduce:
(1) Configure preference.
   ExternalStorageReadOnly=true
   ExternalStorageDisabled=false
(1') or alternatively, apply patch https://codereview.chromium.org/2248033003/
(2) Plug a USB flash drive.
(3) Open Files app.
(4) Attempt to copy file from Drive to the USB flash drive by drag-and-drop.

Expected Result:
"no entry" mark appears besides the dragged file(s).
(It indicates the destination is not writable)

Actual Result:
"+" mark appears besides the dragged file(s).
(It indicates the destination is writable and it will perform copy action if dropped)
If drop files to there, error message will be logged (you will see "2 error messages" at the bottom of the left pane.)

How frequently does this problem reproduce? (Always, sometimes, hard to
reproduce?)
Always, but until device scan happens by some events (for example, suspend and resume).

What is the impact to the user, and is there a workaround? If so, what is
it?
Users will not be able to know a device is not writable until seeing an error after an attempt.
This also affects other apps. (e.g. save-as command of Chrome Browser).
The read-only policy is still correctly applied.
 
This is a transitional issue while implementing a new feature. ( Issue 629945 )
https://codereview.chromium.org/2267653002/ will fix this.

 
Blockedon: 635601
Project Member

Comment 2 by bugdroid1@chromium.org, Aug 24 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6594bf7e1c8d13f7d0ee2648698f11835d1a7733

commit 6594bf7e1c8d13f7d0ee2648698f11835d1a7733
Author: yamaguchi <yamaguchi@chromium.org>
Date: Wed Aug 24 22:16:11 2016

Store read-only flag of mounted disks.

Chrome has been using the readonly field returned by GetDeviceProperties in cros_disks API to tell whether a disk device is wriatble or read-only. However, the field is based on the physical writablilty of the block device, not reflecting the "ro" flag passed to the mount command. This will be an issue once we introduce read-only mount policy.
DiskMountManager needs to remember it because neither the "mount completed" and "disk profile got" DBus messages doesn't convey that information at the moment.

TEST=chromeos_unittests, and manually see that Files app shows no-entry icon when you drag a file to an external storage device from Drive. Apply patch 2248033003 locally to simulate the external_storage_read_only option.
BUG=629945, 640579 

Review-Url: https://codereview.chromium.org/2230713003
Cr-Commit-Position: refs/heads/master@{#414169}

[modify] https://crrev.com/6594bf7e1c8d13f7d0ee2648698f11835d1a7733/chromeos/dbus/fake_cros_disks_client.cc
[modify] https://crrev.com/6594bf7e1c8d13f7d0ee2648698f11835d1a7733/chromeos/disks/disk_mount_manager.cc
[modify] https://crrev.com/6594bf7e1c8d13f7d0ee2648698f11835d1a7733/chromeos/disks/disk_mount_manager.h
[modify] https://crrev.com/6594bf7e1c8d13f7d0ee2648698f11835d1a7733/chromeos/disks/disk_mount_manager_unittest.cc

Status: Fixed (was: Started)
Project Member

Comment 4 by bugdroid1@chromium.org, Aug 25 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/eb9681e84dffcad3042407c86aa4768e6f321cee

commit eb9681e84dffcad3042407c86aa4768e6f321cee
Author: yamaguchi <yamaguchi@chromium.org>
Date: Thu Aug 25 03:49:53 2016

Add comment to clarify what the mock action in the test does.
This is a follow-up of Issue 2230713003.

BUG=629945,  640579 

Review-Url: https://codereview.chromium.org/2273123003
Cr-Commit-Position: refs/heads/master@{#414298}

[modify] https://crrev.com/eb9681e84dffcad3042407c86aa4768e6f321cee/chromeos/disks/disk_mount_manager_unittest.cc

Labels: VerifyIn-54
Cc: dchan@chromium.org trapti@chromium.org krishna...@chromium.org
Labels: M-54
Checked in to 54.0.2840.0 (CrOS 8743.1.0).
Cc: monachow@chromium.org
Components: Enterprise
Labels: -OS-Chrome

Comment 9 by monachow@google.com, Nov 16 2016

Status: Verified (was: Fixed)
Verified:
Verified.
M54-BETA-CHROMEOS-7 (8743.74.0, 54.0.2840.77)
Device: Stout PVT
Policy Server: DM server

Ref: https://bugs.chromium.org/p/chromium/issues/detail?id=629945#c19

Sign in to add a comment