[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [leafnode-list] Permissions
On Sun, 6 Jun 1999, Jeff Grossman <jeff@xxxxxxxxxxx> wrote:
> Thanks for the help. Would you mind explaining a little of what you
Well, um, actually ... yes, I *would* mind, because much of it is in
the man page for chmod(1) and more is in the texinfo system. (I use
GNU Emacs, so I can conveniently get at the latter info; I don't know
how to read it without Emacs.) You can create files and directories
and try out the commands, as well.
Short form explanation:
chmod [ugoa]*[+-=][rwxXstugo]* FILES...
u: change user permissions -- that is, for the owner of the file
g: change group permissions
o: change other permissions
a: all of u, g, and o
If you leave off all the letters, "a" is assumed.
+: give permission ("or" it in)
-: remove permission ("and" it out)
=: give exactly these permissions
r: read permission
w: write permission
x: execute permission
X: execute only if the file is a direc tory or already has execute
permission for some user
s: setuid / setgid, depending on whether the lefthand s
t: sticky bit -- don't ask; pretty useless on modern systems for files
u: whatever the current user permissions are
g: whatever the current group permissions are
o: whatever the current other permissions are
The permission bits mean weird things for directories.
r: you can look at the directory contents.
w: you can change the dir contents: that is, you can create and delete
x: you can search the directory: that is, you can cd into it and open
files in it. Thus, r without x on a directory is fairly useless, x
without r is strange though occasionally useful
s: setuid: no effect that I see
setgid: when you create a file in the directory, the group owner is
the group name for the directory
t: files in the directory can only be deleted by their owner, even if
other people have write permission to the directory.
> chmod g+w failed.postings
Add group write permission, leaving everything else the same.
> chmod u=rw,go=r mydata
For the user (that is, owner), give read and write permission; for the
group and others, give only read. Since all of u, g, and o were
equalled, it turns off all other bits. This is exactly identical to
chmod 644 mydata
> chmod a+x myscript
Give execute permission to everyone; the same as
chmod +x myscript
since an omitted first letter means "a".
chmod go= private
Turn off all permissions (read, write, execute) to group and other.
chmod = silly
Silly example: it turns off all permissions to everyone, including the
owner. Equivalent to "chmod 0 silly".
*** NEW HOME E-MAIL ADDRESS ***
Tim McDaniel (home); Reply-To: tmcd@xxxxxxxx;
if that fail, my work addresses are tmcd@xxxxxxxxxxxxxx and tmcd@xxxxxxxxxxx
tmcd@xxxxxxxxxxxxxxxxx is a lie; tmcd@xxxxxxx is old and will go away.
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list