1

I tried to change permission but it cannot.it says permission denied and operation denied how can i change the mode.. i tried every thing..

enter image description here

I have tried using sudo, but it gave this error

sudo chown bin ns-allinone-3.21
sudo: error in /etc/sudo.conf, line 0 while loading plugin sudoers_policy' sudo: /usr/libexec/sudo/sudoers.so must be only be writable by owner sudo: fatal error, unable to load plugins) 
Bruni
  • 10,542

3 Answers3

4

You need to fix your sudoers problem first, as it will be necessary to run chown in this case. As described in this Stack exchange question in most Unix systems users may only run chown if they have the target user and group privileges.

To fix your sudoers problem:

  1. During boot press and hold the left Shift key or any other key and select "Advanced options for Ubuntu"
  2. boot in "Recovery mode".
  3. Select "Enable networking"
  4. Select "Drop to a root shell propmpt":

Run the following commands

chown root:root /usr/lib/sudo/sudoers.so
chmod 644 /usr/lib/sudo/sudoers.so

Reboot normally.

Bruni
  • 10,542
0

If you want to remove the permissions you can issue the command:

$ chmod ugo-wrx filename

That will take away all the permissions from the filename.

If you want to have only the User (the owner of the file) have access you can issue:

$ chmod u+wrx filename
-1

Generally speaking to change ownership you must be the root user. If you have sudo setup then try using sudo.

sudo chown bin ns-allinone-3.21
Adrian P
  • 101
  • 5
  • I have tried it but it give this error (sudo chown bin ns-allinone-3.21 sudo: error in /etc/sudo.conf, line 0 while loading plugin `sudoers_policy' sudo: /usr/libexec/sudo/sudoers.so must be only be writable by owner sudo: fatal error, unable to load plugins) – Tharaka Siriwardhana Sep 21 '16 at 06:23
  • Hmmm.. you might not have sudo rights.. what you do you get when you run sudo -l – Adrian P Sep 21 '16 at 06:52
  • [nctuopennet@localhost ~]$ sudo -1 sudo: invalid option -- '1' usage: sudo -h | -K | -k | -V usage: sudo -v [-AknS] [-g group] [-h host] [-p prompt] [-u user] usage: sudo -l [-AknS] [-g group] [-h host] [-p prompt] [-U user] [-u user] [command] usage: sudo [-AbEHknPS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p prompt] [-u user] [VAR=value] [-i|-s] [] usage: sudo -e [-AknS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p prompt] [-u user] file ... – Tharaka Siriwardhana Sep 21 '16 at 09:05
  • sudo -L (capitalised version) also works – Adrian P Sep 21 '16 at 22:44