LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-26-2017, 06:08 AM   #1
Sagar.Dalvi
LQ Newbie
 
Registered: Jul 2017
Location: Dombivli
Distribution: Fedora 25
Posts: 1

Rep: Reputation: Disabled
Lightbulb Can some one discuss these interview Question regarding Linux permission?


Effective user id can be set using following permission? 4744 Effective group id can be set using following permission? 2666

Hi, guys reading some interview question and I got some interview stuff online. I have posted this stuff due to I am not getting on any other books and sites. So I need some information regarding What is meant by Effective user id and Effective group id. Here are some question and answer are given.

As I know umask for root and normal user are different. Root user Directory 0022 Files 0133

Normal user Directory 0002 files 0113 Ok! As I want to know whether SUID and SGID have its permission value set. I am not getting Kindly some one discuss these question. Thanks Sagar.dalvi@zoho.com
 
Old 07-26-2017, 10:08 AM   #2
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
"As I want to know whether SUID and SGID have its permission value set."

Google says,

Quote:
SGID (Set Group ID up on execution) is a special type of file permissions given to a file/folder.
Normally in Linux/Unix when a program runs, it inherits access permissions from the logged in user.
and
Quote:
SUID (Set owner User ID up on execution) is a special type of file permissions given to a file.
Normally in Linux/Unix when a program runs, it inherits access permissions from the logged in user.

Last edited by BW-userx; 07-26-2017 at 10:09 AM.
 
2 members found this post helpful.
Old 07-26-2017, 11:15 AM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by Sagar.Dalvi View Post
Effective user id can be set using following permission? 4744 Effective group id can be set using following permission? 2666

Hi, guys reading some interview question and I got some interview stuff online. I have posted this stuff due to I am not getting on any other books and sites. So I need some information regarding What is meant by Effective user id and Effective group id. Here are some question and answer are given.

As I know umask for root and normal user are different. Root user Directory 0022 Files 0133

Normal user Directory 0002 files 0113 Ok! As I want to know whether SUID and SGID have its permission value set. I am not getting Kindly some one discuss these question. Thanks Sagar.dalvi@zoho.com
BW-userx gave you the answers, but there are a couple of things you also need to know. This is a community forum...we aren't going to email you answers to questions; either you participate in the conversations here, or you won't get any answers. Most importantly, you need to consider what's going to happen if you get this job you're interviewing for. If you don't know the answers to the questions asked, then (not to sound nasty), you are not qualified for the job.

Are you going to come to forums for each and every thing you're asked after you're hired??? Do you think your employer isn't going to notice this? BW-userx looked up the answer easily, so when you say you looked 'on any other books and sites', that seems very unlikely.
 
1 members found this post helpful.
Old 07-26-2017, 04:27 PM   #4
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
The manual page man chmod is actually very thorough in its description of this concept.

The parameter for this command, if numeric, is actually octal (base-8), which means that each digit ("0".."7") refers to a three-bit group. This was done because each component of a standard permission mask, rwx, is three bits long. The remaining bits in the word were then assigned to various other purposes, including this one.

Consider the task of implementing, say, your home-grown replacement for the passwd command, which of course allows you to change your password. Well, "only root can do this sort of thing!" And you will probably find that this command is a "setuid" program that is owned by root. When this program is run, by any ordinary Jane or Joe, its effective permissions will be those of root. Thus, even though the issuing user (Jane or Joe) has no such powers, the program does. And this is why it can successfully issue the privileged system calls necessary to change Jane or Joe's password.

You should also know about the apropos command. The command, apropos effective, will list all commands which include that word in their man-page title. (The command, whatis, is similar.) Unfortunately these commands are not perfect: they don't attempt to index words in the text. But for that, you can try a web-search for a search-string such as such as linux man effective.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux Sys admin Interview Question jbhrfx Linux - General 10 09-08-2013 08:19 AM
linux interview question with Answer ranakumar.ahm@gmail.com Linux - Newbie 2 11-12-2011 07:26 PM
A stupid question, but would still like to discuss coolamit78 Linux - Software 1 09-27-2003 01:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration