Changing a file

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!

  1. The problem statement, all variables and given/known data:

Make �hardlink� readable, writeable, executable by you, but not readable, writeable, executable by anyone else. What command did you use to do this?

We created a textfile with a hardlink.

  1. Relevant commands, code, scripts, algorithms:

not sure, i was trying chmod and ln but i am not sure

  1. The attempts at a solution (include all code and scripts):

I have been looking through the man pages but i dont know what it should do.

  1. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):

Washington State University Pullman, WA US Bakken, cpts 224

Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).

I am not sure what the question is.

ln does make links. chmod does change permissions. if you read each of their manual pages, you should be in the clear.

with chmod you can calculate the octal number representation, or go the easy way. If I'm just changing 1 permission set I use the easy way. It starts with any of "ugoa", for user, group, other, and all, respectively.

Here is example, output from my terminal:

[mute@geek ~/lilbo4231]$ touch file.txt
[mute@geek ~/lilbo4231]$ ln file.txt new.txt
[mute@geek ~/lilbo4231]$ ls -l
total 0
-rw-r--r-- 2 mute mute 0 Sep 19 02:37 file.txt
-rw-r--r-- 2 mute mute 0 Sep 19 02:37 new.txt
[mute@geek ~/lilbo4231]$ chmod u+rwx,go-rwx new.txt
[mute@geek ~/lilbo4231]$ ls -l
total 0
-rwx------ 2 mute mute 0 Sep 19 02:37 file.txt
-rwx------ 2 mute mute 0 Sep 19 02:37 new.txt
[mute@geek ~/lilbo4231]$

if the drive is ACL Mounted then use setfacl ..

Octal IS the easy way.

ln 'sourcefile' 'yourfile'
chmod 700 yourfile

s/easy/mnemonic/ in my first post then. :rolleyes:

Octal is easier once you learn that

 uuugggooo
 
-rwxrwxrwx  somefile.txt
 
 421421421

Then add... But I didn't care to give a lesson on numbers. :smiley: