I can never remember what the conversion is from something like
644. Is there a simple web based converter between the 2?
This site provides an interactive way to see what permissions bits are set when various bits are set/unset.
The "calculator" looks like this:
Octal is used for permissions because it's an easy conversion. Each group of
I have this little alias that you can put in your .bashrc (or equivalent).
DISCLAIMER: I am not the author of the script, and I'm not sure who wrote it... but props to him/her for doing this.
Why do you need octal number in the first place?
I always use:
ugo(a) is easy to remember. However you can confuse o:=owner? o:=other? but what would be u, if o=owner? u:=user, therefore o=other.
Some comands like numerical permissions only. Okay, it's not hard to calculate, if you remember the two sequences: ugo + rwx.
Yes, very artificial.
When it comes to s and S I have to consult the manual. Maybe google next time. :)
This is by far the most convenient, and is besides I believe, exactly what you asked for originally:
It is fully interactive, though you cannot edit the string "-r-x-------" but you can the octal or the checkboxes. Doing either updates the other.
From the same page:
Numeric (absolute) mode:
From one to four octal digits Any omitted digits are assumed to be leading zeros.
The first digit = selects attributes for the set user ID (4) and set group ID (2) and save text image (1) The second digit = permissions for the user who owns the file: read (4), write (2), and execute (1) The third digit = permissions for other users in the file's group: read (4), write (2), and execute (1) The fourth digit = permissions for other users NOT in the file's group: read (4), write (2), and execute (1)
The octal (0-7) value is calculated by adding up the values for each digit User (rwx) = 4+2+1 = 7 Group(rx) = 4+1 = 5 World (rx) = 4+1 = 5 chmod mode = 0755