I have a ssh server. I allow people to connect to it if they want. I do my programming homework on it. I am in trouble with my teacher because people were cheating off it. I need to know how to require sudo just to access the file.
Tell me more
×
Unix & Linux Stack Exchange is a question and answer site for
users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
|
You can accomplish the same thing by changing permissions on the files, without requiring sudo. Make sure all users are in only their private user groups, then make sure the files you want to protect are in your private user group, then make sure those files do not have o+rwx permissions. |
|||
|
|
|
Change the owner of the files to root with this command:
Then remove read permission for group (g) and other (o), like this:
Tested on Debian 6 but it should work everywhere. Here's a more complete explanation of Unix permissions, if you're interested in a more in-depth answer. |
|||
|
|