Lesson Review


1.

Describe three useful folder permissions that you can set only from the command line.

2.

Describe the difference between setUID and setGID.

3.

You have rwx permission to a folder that has the sticky bit set. You are not the owner of the folder or the system administrator. You have rw- permission to another user's file in that folder. Can you delete the file? Can you edit the file?

4.

You have written a script that uses the chflags command to lock and unlock files. You would like to use the script on other versions of UNIX. Will it work?

Answers

1.

You can prevent users from seeing a long listing of a folder's contents by denying execute permission. If you set execute but not read permission on a folder, users who know the name of a file can get it, but other users cannot find it. If you set the sticky bit on a folder, a user may remove or rename files in that folder only if the user has write permission for the folder and the user is the owner of the file, the owner of the folder, or the system administrator.

2.

When a program has the setUID bit set, that program always executes with the user ID of the owner of the file, regardless of who actually executes the program. A program with the setGID bit set executes with the group ID of the file's group.

3.

You cannot delete the file, but you can edit it.

4.

It should work on BSD-based versions of UNIX, but probably won't on other versions.




Apple Training Series. Mac OS X System Administration Reference, Volume 1
Apple Training Series: Mac OS X System Administration Reference, Volume 1
ISBN: 032136984X
EAN: 2147483647
Year: 2005
Pages: 258
Authors: Schoun Regan

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net