I don't want to remember codes like 777 all the time . is there any intuitive way to chnage file permission

Suppose i want to have

user --rwx
group --rx
others x

how can i write this way like

chmod ugo +rwxrxx

I don't want to keep previous permissions

link|improve this question

69% accept rate
feedback

2 Answers

up vote 2 down vote accepted

Since you don't want to keep the old permissions, use this:

chmod u=rwx,g=rx,o=x FILE
link|improve this answer
feedback

You should read man page for chmod. There is example:

chmod u+rwx,g+rx-w,o+x-rw filename

link|improve this answer
8  
He didn't want to keep previous permissions, so chmod u=rwx,g=rx,o=x is better. – Teddy May 27 '11 at 7:32
@Teddy , thanks i like ur solution , i didn't knew i can use = – Moorage May 27 '11 at 7:37
feedback

Your Answer

 
or
required, but never shown

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