• Post Reply Bookmark Topic Watch Topic
  • New Topic

absolute and relative and rights  RSS feed

 
Ranch Hand
Posts: 217
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wrote today Linux and it was strange questions.Example lets say i have a tree starting with / . There are /home/student/bob/file1
But it having and this /home/student/alice/file1/file2
And this /home/student/alice/hex
And it was asking for example
if I have ../home/student/alice/ (cwd is bob) this path is absolute or relative?or is false?
Another question /home/student/bob/file1 (cwd is bob) this is an absolute or relative path? Or false?
I lost my mind..cwd change everything?Also,rights to change rights a question asks with umask you change directories and archives the "rights", I think is chmod the command so I put false.Am I right?
 
Marshal
Posts: 56610
172
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, you cannot write chmod false. I suggest you start with this instruction:-
man chmod
or these websites: 1 2 and ask about anything you cannot understand.
 
ekte spiriopoulos
Ranch Hand
Posts: 217
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell Ritchie wrote:No, you cannot write chmod false. I suggest you start with this instruction:-
man chmod
or these websites: 1 2 and ask about anything you cannot understand.
I see your site I think you don't understand it . I tell that there was a question about "permitions" or "rights" and it was telling me the command umask.As I see the site you gave me both it is as I know you change permitions .Umask is the same? Questions talking about directories and files it isn't Chmod command?
 
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A path starting with ".." is a relative path.

A path starting with "/" is an absolute path.

To change access rights of a file or directory, you use the command chmod.
 
Campbell Ritchie
Marshal
Posts: 56610
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ekte spiriopoulos wrote:. . . I see your site I think you don't understand it . . . the command umask. . . .
Which site? Wikipedia? Did you click on the umask link? I think umask is not a command but a set of rules made up as a mask which restricts you in changing permissions with chmod, but I have not looked properly and am not certain.
You write
chmod 664 myfile
which means it is read‑write for yourself and members of your group and read‑only for everybody else. You can also use +x or -x or similar to change permissions. You need those links to find out what the numbers and letters mean.
 
Campbell Ritchie
Marshal
Posts: 56610
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see I was mistaken and you can use umask as a command. If you didn't use umask when you created your file, you can forget all about it.
 
ekte spiriopoulos
Ranch Hand
Posts: 217
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell Ritchie wrote:I see I was mistaken and you can use umask as a command. If you didn't use umask when you created your file, you can forget all about it.
I know English but I Lost you . I will repeat sorry maybe I didn't catch it .In my exam there was a question to answer with true(if line was correct) and false (if the line they gave us it was false.The sentence was like this .
With umask you change "rights" or "permitions" (from file or directory or archive I forget now what it was) .This is true or not?
My answer :False
(I answer false because I thought chmod is doing this.As you gave me topics and you gave me an example I think I done good )
 
Campbell Ritchie
Marshal
Posts: 56610
172
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What sort of exam are you sitting?
 
lowercase baba
Bartender
Posts: 12565
49
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think umask sets any permissions directly. I think it creates a template for what permissions should be when new files are created from that point forward.
 
ekte spiriopoulos
Ranch Hand
Posts: 217
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell Ritchie wrote:What sort of exam are you sitting?
commands(,pwd,cwd,cd,ls,man,cat,mkdir,cp etc) options like -e,-r and more..Paths (absolute and relative) ,Regular Expression,(egrep ,grep,sed,sort)--> this things .Scripts that have( if,for,case,while and using egrep ,grep,sed,sort and regular expressions ,commands like test ,last) .Users and the Rights in unix and linux(this we talk about chmod and umask )ofcourse with r:read,w:write,x:execute and the numbers 777 for example .Processes.The problem is that they making very clever questions one question like the previous i refer was : Superusers have the ability to check all ,but he cant see the "hiding archives" ,true or false?I put it false.I think i am right because he has access to everything
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!