Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.