"sudo nautilus" does not allow changing files or folders

1

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

Aaron Bishop

Posted 2012-05-15T02:59:30.637

Reputation: 11

Watch the language please – soandos – 2012-05-15T03:12:26.707

1What are the current permissions for /usr/lib/sudo/sudoers.so? – CodeGnome – 2012-05-15T03:25:42.213

Answers

3

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).

Dennis

Posted 2012-05-15T02:59:30.637

Reputation: 42 934

I assume nautalis is a typo. – Dennis – 2012-05-15T03:13:34.970

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 – 2012-05-15T11:33:45.043

3

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.

CodeGnome

Posted 2012-05-15T02:59:30.637

Reputation: 1 841

Operation not permitted and aptitude is not installed therefore need sudo to install it ? – Aaron Bishop – 2012-05-15T11:41:43.720

and the only other problem is that I'm using virtual box how do I boot into single user mode? – Aaron Bishop – 2012-05-15T11:45:38.070

1@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. – invert – 2012-05-25T11:27:34.637

0

try su - then press enter then enter password, hope this will also work for you.

paicubes

Posted 2012-05-15T02:59:30.637

Reputation: 101

-1

Under Ubuntu, try

sudo -i  

Enter your password, then

gksu nautilus  

Nautilus will open and allow changes to folders and files.

helper

Posted 2012-05-15T02:59:30.637

Reputation: 1

The problem is that sudo itself refuses to execute, since one of its shared libs is/may be world-writable, thus weakening its security. – Valmiky Arquissandas – 2014-08-04T02:10:12.550