Linux shared folders read only?

437 views
Skip to first unread message

Vaclav Zak

unread,
Jan 16, 2019, 8:19:07 AM1/16/19
to Chromium OS Discussion
Yesterday I got update i which can I finally share my folders with build-in linux. But It seems to be read only. Can anyone same problem?

DennisLfromGA

unread,
Jan 16, 2019, 1:44:36 PM1/16/19
to Chromium OS Discussion
Yes, the owner & group aren't getting set correctly IIUC: 

denny...@penguin:~$ ls -ld /mnt/chromeos/MyFiles/Downloads/
drwxr-xr-x 3 nobody nogroup 60 Jan 13 16:13 /mnt/chromeos/MyFiles/Downloads/
denny...@penguin:~$ ls -ld /mnt/chromeos/MyFiles/Downloads/nix
drwx--x--x 2 nobody nogroup 4.0K Jan 13 16:07 /mnt/chromeos/MyFiles/Downloads/nix

I'm currently using:

11316.66.0 (Official Build) beta-channel
72.0.3626.49 (Official Buildbeta (64-bit)
cros-termina Version: 11316.7.0

~Denny

Joel Hockey

unread,
Jan 16, 2019, 5:55:49 PM1/16/19
to denny.l...@gmail.com, Chromium OS Discussion
We have had some bugs recently where containers are being created without the required uid/guid mapping which is needed for shared folders.

This can be fixed by manually setting the mappings on your profile/container.

In crosh shell (ctrl+atl+t), you can use lxc commands to check what your mappings are and to change them.

The mapping config should be set on the 'default' profile, but could also be set directly on the 'penguin' container.

crosh> vmc start termina

crosh> lxc config show penguin
Likely does not include raw.idmap as part of config, but should show default as part of profiles.

crosh> lxc profile show default
Look for raw.idmap in config.  A value such as 'both 1000 1000' is good.  Empty is bad.

Before making any changes, it is a good idea to make a snapshot of the container that you can always revert to if something goes wrong:

crosh> lxc snapshot penguin

crosh> lxc info penguin
This should now show the newly created snapshot

If raw.idmap is not set, or to change it:
crosh> lxc profile set default raw.idmap "both 1000 1000"

Restart the VM (vmc stop termina), or reboot the device for mapping to take affect.  If your container has a lot of files, it may take up to a few minutes for everything to be remapped on your first restart.


--
--
Chromium OS Discussion mailing list: chromium-...@chromium.org
View archives, change email options, or unsubscribe:
https://groups.google.com/a/chromium.org/group/chromium-os-discuss

DennisLfromGA

unread,
Jan 17, 2019, 9:58:44 AM1/17/19
to Chromium OS Discussion, denny.l...@gmail.com
Joel,

Thanx so much for the explanation and step-by-step workaround, it all worked like a charm.

My default config did not have the raw.idmap setting as you mentioned was a possibility but it's all working great now:

denny...@penguin:~$ touch /mnt/chromeos/MyFiles/Downloads/nix/foo
denny...@penguin:~$ ls -la /mnt/chromeos/MyFiles/Downloads/nix
total 4.0K
-rw-r--r-- 1 denny... denny... 0 Jan 17 14:40 foo

Thanx again,
~Denny

S8M8

unread,
Feb 4, 2019, 8:26:53 PM2/4/19
to Chromium OS Discussion, denny.l...@gmail.com
This does not work with Google Drive - after applying this fix the "Share for Linux" option is gone for all Google Drive folders ... 

Also all folders in Google Drive appear to be mounted with chmod 750 with no group set but the correct user was set ... so there seems to be another bug related to Google Drive 
Reply all
Reply to author
Forward
0 new messages