Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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......

share|improve this question

1 Answer 1

up vote 4 down vote accepted

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
share|improve this answer
    
I get permission denied, & the way I want to implement this I can't authenticate using sudo –  Samantha Catania Aug 8 '11 at 16:04
    
@Samantha You got it making a new directory or changing the mode of a directory you own? –  Michael Mrozek Aug 8 '11 at 16:05
    
I managed to make it work by running the mkdir from the /bin/mkdir. Thx for all the help –  Samantha Catania Aug 8 '11 at 16:08

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.