New issue
Advanced search Search tips

Issue 916015 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug

Blocking:
issue 883427



Sign in to add a comment

RAR archives cannot be mounted from Downloads folder on nocturne.

Project Member Reported by amistry@chromium.org, Dec 18

Issue description

Chrome Version: 71.0.3578.57 (nocturne)
OS: Chrome

What steps will reproduce the problem?
1. Copy rar file to Downloads folder.
2. Open rar file.

What is the expected result?
RAR is mounted and contents can be viewed.

What happens instead?
Error dialog is shown with "error_internal" error.

The following is seen in logs:
2018-11-15T22:40:13.837970+00:00 ERR cros-disks[1880]: Failed to get real path of '/home/chronos/u-bc6594a644749cf3a3a99c1a0e47c4bc0e5da07f/Downloads/Wall/sample.rar': Permission denied
2018-11-15T22:40:13.839227+00:00 ERR cros-disks[1880]: Failed to mount '/run/avfsroot/users/u-bc6594a644749cf3a3a99c1a0e47c4bc0e5da07f/Downloads/Wall/sample.rar#urar' '/media/archive/sample.rar' '' 4110 '': Permission denied
2018-11-15T22:40:13.839280+00:00 ERR cros-disks[1880]: Failed to mount '/run/avfsroot/users/u-bc6594a644749cf3a3a99c1a0e47c4bc0e5da07f/Downloads/Wall/sample.rar#urar' to '/media/archive/sample.rar' as filesystem '' with options 'bind,rw,nodev,noexec,nosuid'
2018-11-15T22:40:13.839316+00:00 ERR cros-disks[1880]: Failed to mount path '/home/chronos/u-bc6594a644749cf3a3a99c1a0e47c4bc0e5da07f/Downloads/Wall/sample.rar'
2018-11-15T22:40:13.839376+00:00 ERR cros-disks[1880]: Failed to mount '/home/chronos/u-bc6594a644749cf3a3a99c1a0e47c4bc0e5da07f/Downloads/Wall/sample.rar'

Inspecting the directory structure of a local test nocturne (running 72) shows ~/Downloads is owned by 'chronos:chronos' with 0710 permissions. On chell, it's owned by 'chronos:chronos-access' with 0710. cros-disks is in the 'chronos-access' group, and hence it can execute every path leading up to the file on the chell, but not on the nocturne. The execute permission is needed for realpath to succeed, and I suspect it's also necessary for either mounting or AVFS.
 
Blocking: 883427
Labels: -M-72 M-73
Project Member

Comment 3 by bugdroid1@chromium.org, Jan 19 (4 days ago)

Labels: merge-merged-chromeos-4.19
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/1fd4bf0aadf0b26f0a206e33eb3dc04cd33d114c

commit 1fd4bf0aadf0b26f0a206e33eb3dc04cd33d114c
Author: Sarthak Kukreti <sarthakkukreti@chromium.org>
Date: Sat Jan 19 04:05:16 2019

CHROMIUM: esdfs: do not modify permissions on Downloads directory

On lookup, esdfs touches up the ownership of the lower filesystem.
Ignore the Downloads directory while setting permissions, we assume
that the Downloads directory would have the correct permissions
set up when the user logs in. Note that this only skips the
Downloads directory: all subdirectories and files would still be
get their lower ownership changed on esdfs_lookup.

Also, ATTR_KILL_S{U,G}ID is called for inodes that are not
directories in esdfs_derive_lower_ownership, which can also be
skipped for the special Downloads directory.

BUG=chromium:916015
TEST=Downloads gid does not change to "chronos".

Change-Id: I09199fa381f450aa9a4c1b52d5e93ef46466462e
Signed-off-by: Sarthak Kukreti <sarthakkukreti@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1385394
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>

[modify] https://crrev.com/1fd4bf0aadf0b26f0a206e33eb3dc04cd33d114c/fs/esdfs/lookup.c

Sign in to add a comment