Super User is a question and answer site for computer enthusiasts and power users. 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 ext4 formatted usb hard disk, I want to use to move between different computers with different users. How should I set its directories' permissions it, so that every user can r/w? What should file permissions look like (its mainly movies and mp3s).

share|improve this question
up vote 1 down vote accepted

If you really don't care who writes what where, and assuming the disk is mounted at /mnt/media-disk, then the best way to set full permissions for everyone would be to run these two commands:

find /mnt/media-disk/ -type f -exec chmod 666 {} \;
find /mnt/media-disk/ -type d -exec chmod 777 {} \;

The first command will set read and write permissions for everyone, on every file on the disk; the second will set read, write, and execute permissions, on every directory. (On directories, execute permission enables traversal, i.e., descent past that directory into others contained within it.)

For more details, try man find and man chmod at any shell prompt.

share|improve this answer
    
Isn't 777 execute, too? – Jan May 23 '13 at 22:18
    
Whoops, so it is -- probably wouldn't matter, but I'll edit the question all the same. – Aaron Miller May 23 '13 at 22:20
    
That seems to have done it! Thanks! – Jan May 23 '13 at 22:30
    
Glad to be of help! – Aaron Miller May 24 '13 at 15:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .