Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am trying to configure apache2 with cgi (python).

For that, I have to change permissions of some folders and files but I am getting sudo fatal errors every time I try to change the permission of a file or a Folder.

For Example:

1

j@ubuntu:/etc/apache2$ ls

apache2.conf envvars magic mods-enabled sites-available

conf.d httpd.conf mods-available ports.conf sites-enabled

j@ubuntu:/etc/apache2$ sudo chmod 777 httpd.conf

sudo: /usr/lib/sudo/sudoers.so must be only be writable by owner

sudo: fatal error, unable to load plugins

...................................................................................

2

j@ubuntu:/usr/lib/cgi-bin$ sudo /etc/init.d/apache2 restart

sudo: /usr/lib/sudo/sudoers.so must be only be writable by owner

sudo: fatal error, unable to load plugins

...................................................................................

3

j@ubuntu:/usr/lib$ sudo chmod -R 777 /usr/lib/cgi-bin

sudo: /usr/lib/sudo/sudoers.so must be only be writable by owner

sudo: fatal error, unable to load plugins

...................................................................................

Note:

j@ubuntu:/etc/apache2$ ls -l /usr/lib/sudo/sudoers.so

-rwxrwxrwx 1 root root 177452 Jan 31 2012 /usr/lib/sudo/sudoers.so

share|improve this question
    
type su into terminal this should give you rout privileges then you do not have to use the sudo command. –  SimplySimon Jun 6 '13 at 9:35
    
@SimplySimon- Thanks for replying back. When I typed su, it asked me for password and then it says authentication failure. –  jags Jun 6 '13 at 9:37
    
Are trying to edit these files? –  Mitch Jun 6 '13 at 9:37
    
@Mitch - Yes. Thanks. –  jags Jun 6 '13 at 9:38
1  
Try sudo vi <pathtofile/file_name> –  Mitch Jun 6 '13 at 9:39
show 2 more comments

1 Answer

From the comments, it looks like anything run with sudo will fail because of this. Does it work if you use pkexec instead? For example:

pkexec chmod go-w /usr/lib/sudo/sudoers.so

This should remove write permissions from "group" and "other", and leave the "user" (owner) permission intact.

Edit: Whoops, wrote sudo in the command by mistake. Fixed now.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.