New issue
Advanced search Search tips

Issue 818876 link

Starred by 2 users

Issue metadata

Status: Unconfirmed
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: 2019-07-09
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Chrome OS uses inconsistent permissions for /mnt/stateful_partition/unencrypted/cache

Project Member Reported by yusukes@chromium.org, Mar 5 2018

Issue description

Chrome OS Version: R66-10440.0.0 minnie

Steps To Reproduce:
(1) boot the device, make sure /mnt/stateful_partition/unencrypted/cache is root:root + 0755.
(2) ssh into the device and run 'rm -rf /mnt/stateful_partition/unencrypted/cache'
(3) sign in
(4) sign out. The cache/ directory is re-created upon sign-out.

Expected Result:

/mnt/stateful_partition/unencrypted/cache is still root:root + 0755.

Actual Result:

It's now root:root + 0700.

How frequently does this problem reproduce? (Always, sometimes, hard to
reproduce?)

Always.

What is the impact to the user, and is there a workaround? If so, what is
it?

Once this happens, non-root user (e.g. anroid-root) cannot access the directory. This has caused issue 814469.

Please provide any additional information below. Attach a screen shot or
log if possible.

This seems to happen without the manual rm -rf. According to feedback reports listed in issue 814469, many users' /mnt/stateful_partition/unencrypted/cache directories seem to have 0700.


 

Comment 1 by derat@chromium.org, Mar 6 2018

Cc: jorgelo@chromium.org mnissler@chromium.org
This is from chromeos_startup:

---

# Make sure unencrypted stateful partition has the needed common directories.
# Any non-common directories should be created in the device implementation of
# "mount_var_and_home_chronos".
for d in home home/chronos home/root home/user \
         unencrypted unencrypted/cache unencrypted/preserve; do
  mkdir -p -m 0755 "/mnt/stateful_partition/${d}"
  check_directory "/mnt/stateful_partition/${d}"
done

---

That just runs at boot. Should we add a chmod as well to make sure that the permission gets fixed if it's wrong? "mkdir -p -m" doesn't appear to update permissions when the directory exists.
I think so, yes.
Labels: Pri-3
NextAction: 2019-07-09
Downgrading P2s that haven't been modified in more than 6 months, which have no component or owner.

Comment 4 by osh...@chromium.org, Jan 18 (4 days ago)

Components: OS>Systems>Security

Comment 5 by vapier@chromium.org, Jan 19 (3 days ago)

should figure out what is creating the dir with 0700 perms and fix that as a boot time reset doesn't help systems when it goes wrong at runtime

Sign in to add a comment