Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam 102-500 topic 1 question 77 discussion

Actual exam question from LPI's 102-500
Question #: 77
Topic #: 1
[All 102-500 Questions]

What is true about the file .profile in a user's home directory?

  • A. It must be executable.
  • B. It must call the binary of the login shell.
  • C. It must use a valid shell script syntax.
  • D. It must start with a shebang.
  • E. It must be readable for its owner only.
Show Suggested Answer Hide Answer
Suggested Answer: E 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Vendo
Highly Voted 3 years, 7 months ago
The .profile was the original profile configuration for the Bourne shell (a.k.a., sh). bash, being a Bourne compatible shell will read and use it. Any shell providing bourne compatibility will read .profile. and thus, I believe is C true.
upvoted 11 times
...
chris12aug
Highly Voted 1 year, 10 months ago
Selected Answer: C
-rw-r--r-- 1 ubuntu ubuntu 807 Jan 6 16:23 .profile A. It must be executable. (Wrong it is not) B. It must call the binary of the login shell. (No it is not necessary) C. It must use a valid shell script syntax. (correct) D. It must start with a shebang. (Wrong it does not start by shebang, it is called from /etc/profile file) E. It must be readable for its owner only. (Wrong it is not)
upvoted 6 times
...
Mchoeti
Most Recent 1 year ago
Selected Answer: C
Option C my friends. The file .profile in a user's home directory must use a valid shell script syntax.
upvoted 2 times
...
NetOps_Dave
1 year, 11 months ago
E is correct imho: The .profile file does not start with a !# so it does not follow shell scripting syntax. It does not need to be executable. The standard permissions are set to -rw-r--r-- so actually it is readable for everyone, but because it is in the users directory only the user is able to read it. I think that, because of the other answers are definitively not right, E is the most sane answer. Still an annoyingly confusing question though..
upvoted 1 times
MaikyCR28
1 year, 10 months ago
So, should the "others" be part of the group to have read access to it?
upvoted 1 times
...
...
lucaverce
1 year, 11 months ago
Selected Answer: C
C is right "it must use a valid shell script syntax" obvious always respect the shell syntax E is wrong because the permission normally are 644
upvoted 2 times
...
Lazylinux
2 years ago
Selected Answer: C
C is correct ...E is wrong because ALL have Read permission check yourself on linux box D is WRONG as it doesnt not need to start with SHE Bang!!! oops typo Shebang..below is cut/paste of the actual file root@Debian:~# cat .profile # ~/.profile: executed by Bourne-compatible login shells. if [ "$BASH" ]; then if [ -f ~/.bashrc ]; then . ~/.bashrc fi fi mesg n 2> /dev/null || true
upvoted 3 times
...
dspaula
2 years, 1 month ago
Selected Answer: D
C is correct
upvoted 2 times
...
Robert12
2 years, 2 months ago
I dont think C is correct , the .profile file does not have a shebang
upvoted 1 times
...
shahab
3 years, 2 months ago
C is correct
upvoted 2 times
...
sigi63
3 years, 4 months ago
The rights for the file are 644 shebang is not available C is the correct answer.
upvoted 4 times
rb1353
3 years, 4 months ago
I think I am misunderstanding something then, wouldn't valid shell script syntax include a shebang, so that would mean if c is true, then d must be true as well?
upvoted 3 times
soullessone
2 years, 2 months ago
I think all are misunderstanding the question. Everywhere the answer is C, but I think it is wrong and the permission is asked here. It must be r for all or user! I would go with E And Syntax is meant # !/bin/bash or what ever.
upvoted 1 times
soullessone
2 years, 2 months ago
shell scripts have a specific syntax: #!interpreter [optional-arg]
upvoted 1 times
...
...
...
...
ilputto
3 years, 4 months ago
I think C is the correct answer
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...