echo echo Here in try > try
tryWhat happens? __________________________
Owner: _______
Group: _______
Other: ______
chmod u+x try
tryWhat happened this time? _________________________
echo echo Second command >> try
chmod u-w try
echo echo Third one >> tryWhat happens? _____________________
/bin/grep.
Who owns the file? ________________________
What are the permissions for other users (like you)? __________
Can you write to the file? _________________ (you can try with "echo junk >> /bin/grep").
Now make a new subdirectory in /tmp named
/tmp/ptest. (e.g. if /tmp is your current
directory, mkdir ptest).
Make /tmp/ptest your current directory.
/tmp/ptest/p1 using echo
or vi.
What userid owns the file? _______________________
What group has group ownership of the file? _____________________
chmod 600 p1See text for use of numeric permissions.
p1
to "extra". Try the chown
command without sudo. What happens? ___________________________
Now use sudo to change ownership of p1
to "extra". (e.g. sudo chown extra p1.
ls -l to verify ownership. What are the permissions?
________________________
p1 (using
(cat or vi).
What happens? __________________________
p1 (using echo or
vi).
What happens? __________________________
/tmp your current directory: ________________________
/tmp: _________________________
drwxr--r--
_____________________________________
Command: ______________________________
What happens: ____________________________________
drwxr-xr-x
(you will need to use sudo since your userid, "square", is no longer the
owner). ____________________________________
What happens? _____________________________________
Why? ____________________________________
This handout with answers filled in (handwritten).