"sudo nautilus" does not allow changing files or folders

8,328

Solution 1

Try gksudo nautilus instead.

From RootSudo - Community Ubuntu Documentation # Graphical Sudo:

You should never use normal sudo to start graphical applications as Root. You should use gksudo (kdesudo on Kubuntu) to run such programs. gksudo sets HOME=~root, and copies .Xauthority to a tmp directory. This prevents files in your home directory becoming owned by Root. (AFAICT, this is all that's special about the environment of the started process with gksudo vs. sudo).

Solution 2

Assuming that the error message is accurate, and that you can gain access to root, then you should do what the message says and add write permissions to the file:

~# chmod 644 /usr/lib/sudo/sudoers.so

Alternatively, you can force a re-installation of sudo, which will reset the permissions on the files in that package:

~# aptitude reinstall sudo

If you don't have access to root via su, you can try booting into single user mode, or a chroot into your system with a recovery CD in order to effect repairs. You will definitely need some means of gaining root permissions to fix your problem, though.

Share:
8,328

Related videos on Youtube

Aaron Bishop
Author by

Aaron Bishop

Updated on September 18, 2022

Comments

  • Aaron Bishop
    Aaron Bishop over 1 year

    I can't modify files in Ubuntu 12.04. I'm trying to change the permissions so that I can add a folder or change a file and all I get is this:

    $ sudo nautilus
    sudo: /usr/lib/sudo/sudoers.so must only be writeable by owner   
    sudo: fatal error, unable to load plugin
    
    • soandos
      soandos almost 12 years
      Watch the language please
    • CodeGnome
      CodeGnome almost 12 years
      What are the current permissions for /usr/lib/sudo/sudoers.so?
  • Dennis
    Dennis almost 12 years
    I assume nautalis is a typo.
  • Aaron Bishop
    Aaron Bishop almost 12 years
    nope and nope still doesn't work the entire sudo suit doesn't work not even su. It's something to do with he permissions but without sudo it's almost impossible to change :S any ideas?
  • Aaron Bishop
    Aaron Bishop almost 12 years
    Operation not permitted and aptitude is not installed therefore need sudo to install it ?
  • invert
    invert almost 12 years
    @AaronBishop: At the GRUB boot loader prompt, scroll down to the "Recovery" option. This will boot you into a root terminal, or a curses menu form which you can continue into the root terminal (depending on the distro/release). Then retry @CodeGnome's chmod command. Reboot and repent.
  • Valmiky Arquissandas
    Valmiky Arquissandas over 9 years
    The problem is that sudo itself refuses to execute, since one of its shared libs is/may be world-writable, thus weakening its security.