Contact Us
Projects | Assignments
sellfycode@gmail.com
More
Get Homework Help
English
Español
Português
Français
Deutsch
Italiano
Русский
close
Contact Us
Projects | Assignments
sellfycode@gmail.com
Starting from:
$30
Add to cart
CECS326- Homework 22 Solved
Purpose: This assignment provides experience with the Unix protection mechanisms.
You will need a partner for the last part of this assignment.
Make a copy of homework 2 copy.c called copy2.c.
1) Remove the use of argv[2], the destination file name should always be xfer.tmp in your home directory
(To determine your home directory use pwd.) Make sure you start the path name with a / 2) Compile the program, test it from your account.
3) Modify the protections of your home directory with chmod 711 ~
4) Add getuid and geteuid calls to the front of your code. Print the two numbers.
Now do the following two tests with a partner.
5) Have the partner run your program ~yourlogin/copy.out It should fail.
6) Change the mode of your copy.out to 4711 Have your partner run the program again. It should work.
Demo: The Instructor would like to see a demo of the last 2 tests. Make sure to test them first before the demo.
Starting from:
$30
Add to cart
1 file (16.1KB)
More products
ECE523- Homework #1 Solved
$25
Add to cart
ISYE6740- Homework 3 Solved
$30
Add to cart
ISYE6740- Homework 2 Solved
$30
Add to cart