Find the answer to your Linux question:
Results 1 to 6 of 6
Hi, I have a strange problem with 'sudo'. In my system (if it is not universal feature) I cannot read '/etc/make.conf'. It says 'Permission denied'. I then tried to read ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User saivin's Avatar
    Join Date
    Dec 2008
    Location
    Bengaluru, India
    Posts
    305

    sudo does not read 'make.conf'


    Hi,
    I have a strange problem with 'sudo'. In my system (if it is not universal feature) I cannot read '/etc/make.conf'. It says 'Permission denied'. I then tried to read with 'sudo' command. But even for 'sudo' it gives the same error. I then did a 'su'. With root login I could read the file.

    So, my question is, is 'sudo' any less privilaged than 'su' inspite of assigning ALL=(ALL) ALL to my 'sudo' account?

    I tried googling but no help with my problem. Can any of you simulate it on your gentoo system and confirm please?
    A candle looses nothing by lighting other candles. - Khalil Zibran.
    Registered Linux User #490076

  2. #2
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    1,217
    You should be able to read make.conf without using sudo. My make.conf has permissions rw-r--r--. Have you tried doing
    Code:
    ls -l /etc|grep make
    to find out what the permissions are?
    "I'm just a little old lady; don't try to dazzle me with jargon!"
    www.hrussman.entadsl.com

  3. #3
    Linux User saivin's Avatar
    Join Date
    Dec 2008
    Location
    Bengaluru, India
    Posts
    305
    No, my problem is not reading the file. My interest is to know how/why 'sudo' and 'su' behave so differently when ALL=(ALL) ALL is set for the sudo account. With that permission, sudo is same as root isn't it? How come I cannot read a file (even if system file) with sudo?
    A candle looses nothing by lighting other candles. - Khalil Zibran.
    Registered Linux User #490076

  4. #4
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    3,043
    what does
    Code:
    sudo -l
    report?

  5. #5
    Linux User saivin's Avatar
    Join Date
    Dec 2008
    Location
    Bengaluru, India
    Posts
    305
    Code:
    saivin@SV-V1400 ~ $ sudo -l
    User saivin may run the following commands on this host:
        (ALL) ALL
    A candle looses nothing by lighting other candles. - Khalil Zibran.
    Registered Linux User #490076

  6. #6
    Linux User saivin's Avatar
    Join Date
    Dec 2008
    Location
    Bengaluru, India
    Posts
    305
    Ok, ok, now its working. I'm able to read the make.conf with 'sudo' too. Don't know what happened. The otherday it was not opening and today its working... strange...
    A candle looses nothing by lighting other candles. - Khalil Zibran.
    Registered Linux User #490076

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •