Public bug reported:

My simple way of backing up my important personal data is to have a
folder in my home directory called "sync".  I file all data under there
that ought to be periodically backed up.  I also have a USB drive,
formatted with VFAT.  I have a "sync" folder on that USB drive as well.
I want to be able to use unison-gtk to syncronize these two folders
called "sync".  But when I plug in the USB drive, it gets automounted
with the mount option "umask=077".  So all files on the USB drive get
seen and created with permissions looking like "rwx------".  But my
umask (that all users have by default) is "0022", thus all their newly
created files will have permissions like "rw-r--r--".

When I try to do a sync in unison-gtk, it can sync in only one
direction: from the USB drive to my home folder.  And the files it syncs
to my home folder all annoyingly have permissions like "rwx------".
This leads to trouble like text files that are wrongly made
"executable", and directories that you intend other users to be able to
read cannot be, because they are not "executed" by any other user (even
if one remembers to add group permission allows their reading of that
folder).

Furthermore, one cannot sync files from the local folder to the USB
drive, because the desired permissions unison-gtk would like to use (ie.
"rw-r--r--" that most local files would have by default) can't be used
on the USB drive, as the mount options insist that all newly created
files on the USB drive have the permissions "rwx------" only.  So you
see errors in unison-gtk for each and every file it tries to copy onto
the USB drive.

I have two ideas to address this:

1) In Gnome's System menu -> Preferences -> Removable Drives and Media
-> "Storage" tab, please add an "Advanced" button under "Removable
Storage", and allow the user to set a different umask to be used when
USB drives get automounted, and in my case I would probably want to use
something like "133", making all the files on the USB drive
appropriately appear as "rw-r--r--" (and hopefully the directories on
the USB drive can somehow still be navigatable, ie. "executable").

2) At the time of automounting the USB drive, perhaps the user's current
umask (ie. as defined in .bash_profile) needs to be looked at, and a
umask mount option for automounting needs to be dynamically figured out
to nicely match this, such that unison-gtk will be happy.

** Affects: Ubuntu
     Importance: Undecided
         Status: Unconfirmed


** Tags: drive mount sync unison unison-gtk usb vfat

-- 
can't easily use unison-gtk to sync a local folder to my VFAT USB drive
https://bugs.launchpad.net/bugs/118283
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to