Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

chmod conversion 1

Status
Not open for further replies.

gatetec

MIS
Mar 22, 2007
420
US
What is the octet value of this permission?

drwxr-sr-x

Is there an online tool that I can utilize for converting chmod back and forth (octal <-> symbolic)?

thx much
 
2755

If you do a search on "chmod calculator" you'll find dozens (hundreds?) of different conversion tools that may help you with what you're looking for. Many of the tools explain how they come up with the results, so you'll probably end up learning it in no time.

 
You don't need a calculator. That conversion is trivial.

r=4, w=2, x=1
no right = 0 = "-"
The "d" stands for "directory"

When you take one of the three permission digits, then it is one of these:
1 (x), 2 (w), 4(r)
3 (xw), 5 (rx), 6 (rw)
7 (rwx)

Then you just place three numbers there: one for owner, one for group, one for the "world".

 
Sometimes you need the "s" and such (set uid, set gid) but that's not difficult to learn either, once you master the ordinary permissions. (hint: prepend the number, replace the x with s).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top