Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an external HDD. It's portable, so I plug it in all over the place. Needless to say, these different places have different passwd files and uids. The files are mine and I need to access them everywhere.

Currently, every time I plug it in somewhere I have to

sudo find . -type f -exec chmod a+rw \{\} \+
sudo find . -type d -exec chmod a+rwx \{\} \+

Which assumes I have root access, of course. I could run this command (without sudo) at the end of a session instead, but either way it's a faff and takes a lot of time (it's a ½TB drive).

One option is to use a FS that does not understand permissions, exFAT, for example. However I'm using BTRFS because I use the snapshot facility.

Is there a way at the FS level I can disable permissions - leave everything wide open? Or if you have another way, how do you do this?

share|improve this question
Excuse me if the question is silly, but shouldn't those permissions last from mount to mount? I.e., once you do a "chmod a+rw", it should stay the same until you change them. – rsuarez May 15 '14 at 9:50
Of course. The point is to check permissions on all files created/modified in sessions. Session 1: user 1000 creates file x; Session 2 as user 2000: run sudo find... to open access to user 2000 to files created by user 1000 in Session 1; Session 3 as user 3000: run sudo find... to open access to files created in Session 2 (as you point out, Session 1's files should still be available)... – artfulrobot May 15 '14 at 10:42
Ok, another idea: how about setting umask to 0000 every time you work with the external HDD? That should force every created file and directory with permissions for everyone. Besides, and sorry if this is obvious, have you chmod'ed the root directory to 0777? – rsuarez May 15 '14 at 14:21
@rsuarez no, that would affect ALL my work on any file - it's only the portable ones I want portable not my mail, home dir etc! (and also difficult to set for all running apps, e.g. gnome apps) – artfulrobot May 15 '14 at 16:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.