I need to create a directory that is RW to all users using chown. what arguments should I pass chown to get a file with those permissions? Or maybe there is an even better way to do it......

1 Answer 1


chown is used to change ownership; you're looking for chmod to change the mode. You want to add (+) read and write (rw) for all users (a), so it's:

$ chmod a+rw dirname

You can also do it directly when you make the directory by passing mkdir the -m flag; it takes the same syntax as chmod:

$ mkdir -m a+rw dirname
  • I get permission denied, & the way I want to implement this I can't authenticate using sudo Aug 8, 2011 at 16:04
  • @Samantha You got it making a new directory or changing the mode of a directory you own? Aug 8, 2011 at 16:05
  • I managed to make it work by running the mkdir from the /bin/mkdir. Thx for all the help Aug 8, 2011 at 16:08

You must log in to answer this question.

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