Permission flags: r = read, w = write, x = execute Permissions are displayed
for owner, group, and others.
# display files, with permissions
ls -l
# make file readable, writeable, and executable for group/others
chmod 777 myfile
# make file readable and executable for group/others
chmod 755 myfile
# make file inaccessible for all but the owner
chmod 700 myfile
# make file readable and executable for group/others,
# user assumes owner's group during execution
chmod 4755 myfile
# change permission flags for directory contents
chmod -R mydir
# change group to staff for this file
chgrp staff myfile
# change owner to jsmith for this file
chown jsmith myfile
|
|