Changing file permission on host in Wubi

I have Ubuntu installed on my laptop using Wubi. Wubi is an easy way of installing Ubuntu next to your Windows. After installing you will have a dual boot system, where you have to choose at start-up between Windows and Ubuntu.

If you are running Ubuntu, you can still access your folders and files on your host (Windows). Look for the folder ‘host’ under your file system. One possible disadvantage is that file permissions are set to root.

Changing file permission or ownership using chown, chmod and chgrp does not work. This is because your host system uses a NTFS partitioning, which uses a different file permission system.

I found a solution on the UbuntuForum (here). The trick is to make Ubuntu believe that everything on /host is owned by him and the permissions are set to 775.

What you do is to change one line in the file /etc/default/grub:

From: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
To: GRUB_CMDLINE_LINUX_DEFAULT="rootflags=umask=002,uid=1000,gid=1000 quiet splash"

After you make the changes, you need to run  ‘update-grub’ afterwards to update /boot/grub/grub.cfg.

One word of caution, these changes give you full access to all your files on your host, including system files. Needless to say that this is potentially dangerous, so make sure to stay away from system folders (and only do this when you really need to)!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s