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
29717
Whenever I try to install or remove something using terminal it gives the following error message:  bluebird@bluebird:~$ sudo apt-get update sudo: /usr/lib/sudo/sudoers.so must be only be writable by owner sudo: fatal error, unable to load plugins bluebird@bluebird:~$ sudo apt-get remove vlc sudo: /usr/lib/sudo/sudoers.so must be only be writable by owner sudo: fatal error, unable to load plugins bluebird@bluebird:~$ sudo apt-get install apt-file sudo: /usr/lib/sudo/sudoers.so must be only be writable by owner sudo: fatal error, unable to load plugins
17150
How do I edit an invalid sudoers file? It throws the below error and it's not allowing me to edit again to fix it.  Here is what happens:  $ sudo visudo &gt;&gt;&gt; /etc/sudoers: syntax error near line 28 &lt;&lt;&lt; sudo: parse error in /etc/sudoers near line 28 sudo: no valid sudoers sources found, quitting
11898
I'm gearing up to deploy a Drupal 7 site and I can't find any documentation about what the recommended security-conscious file and directory permissions should be set to.  Specifically default/files/ (also sub directories?), settings.php, .htaccess and anything else I should be aware of.
72754
Is this a correct way for passing an environment variable in sudo ?  sudo -u www-data -b env FOOBAR="foobar" /home/user/folder/daemon
16096
I was going to change the ownership of a directory to apache:apache, but I ended up running:  chown -R apache:apache /   Bad! Very bad! I knew what was going on when it started saying:     chown: changing ownership of `/proc/2694/fd/48': Permission denied   That's when I stopped everything (Ctrl+C).    The current system I have is a server running virtualbox running CentOS 5. This problem happened inside the VM.  Currently, everything seems to be working, but I have not restarted the system yet, and to be honest, I'm afraid that if I did something will break.  I do not know chown's order, should I be concerned and assume something will break after a reboot? Is there a way to recover form this problem without having to rely on backups? I do have a daily one, but I thought there may be a simpler way out.
59784
Yesterday my supervisor mounted one of his directories onto my server. The problem is, I can't access them and I have no way of contacting him right now. When I type in the URL I get this error:  Forbidden You don't have permission to access /~&lt;username&gt;/core/ on this server.   I tried to cd into the "core" directory and do the following:  chmod -R 755 *.*   but, even with all the permissions changed, I still can't get access! The weird thing is, I can access and edit the files.
59475
I am getting this error:  sudo: parse error in /etc/sudoers near line 23 sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin   I was trying to disable password authentication so I don't have to type password every time I want to install something, but I probably changed it in a not very good way. I am a newbie to Ubuntu, I got sick of Windows :)  So far I've found some people suggesting booting in single user mode, but I'm afraid of messing things up more.  How can I fix this error?
10
For some reason I can't change the file permissions of my var/www folder or anything else inside it. I've tried using gksu-nautilus to change the permissions but it doesn't work. When I open the properties window, and select a different level of permission for myself, it instantly switches back to the previous setting.  Any idea of how to fix this?
76256
I get error message always when I work with sudo command.  It shows always sudo: /var/lib/sudo writable by non-owner (040777), should be mode 0700.   A while ago I changed the permission of /var folder to 777.   How can I fix it?
13316
I'm getting a 403 error message with Apache, in Debian Testing.  Apache version:  # aptitude show apache2 | grep -i version Version: 2.4.9-1  # ls -la /home/  total 28 drwxr-xr-x  4 root    root     4096 Apr  3 13:19 . drwxr-xr-x 23 root    root     4096 Apr  4 07:28 .. drwx------  2 root    root    16384 Apr  3 13:13 lost+found drwx--x--x 36 username username  4096 Apr  7 13:30 username  # ls -la /home/username/Development/PHP/foo.dev.com/  total 16 drwx--x--x 4 username username 4096 Apr  3 14:35 . drwx--x--x 6 username username 4096 Apr  3 14:36 .. drwx--x--x 2 username username 4096 Apr  3 14:35 logs drwx--x--x 8 username username 4096 Apr  3 14:35 public_html  # cat /etc/apache2/sites-enabled/dev.com.conf UseCanonicalName Off  &lt;VirtualHost *&gt;     VirtualDocumentRoot "/home/username/Development/PHP/%0/public_html/"     &lt;Directory "/home/username/Development/PHP/%0/public_html/"&gt;         Require all granted     &lt;/Directory&gt; &lt;/VirtualHost&gt;  # cat /var/log/apache2/error.log [Mon Apr 07 14:08:15.069251 2014] [authz_core:error] [pid 8649] [client 127.0.0.1:48578] AH01630: client denied by server configuration: /home/username/Development/PHP/foo.dev.com/public_html/   Firefox, "No proxy for" configuration:     localhost, 127.0.0.1, *.dev.com  # cat /etc/hosts: hosts        hosts.allow  hosts.deny root@username:/home# cat /etc/hosts 127.0.0.1   localhost 127.0.1.1   username.mymachine.local    username  # Custom 127.0.0.1   teste.dev.com  # The following lines are desirable for IPv6 capable hosts ::1     localhost ip6-localhost ip6-loopback ff02::1 ip6-allnodes ff02::2 ip6-allrouters   UPDATE 1:  SELinux does not seems to be installed:  $ aptitude search ~i | grep selinux i   libselinux1                     - SELinux runtime shared libraries   UPDATE 2:  $ ls -la /home/ total 28 drwxr-xr-x  4 root    root     4096 Apr  3 13:19 . drwxr-xr-x 23 root    root     4096 Apr  4 07:28 .. drwx------  2 root    root    16384 Apr  3 13:13 lost+found drwx--xr-x 38 username username  4096 Apr  9 08:26 username
31115
I updated MacOS Sierra's Apache and PHP, and now whenever I $ sudo apachectl restart I get this:  AH00557: httpd: apr_sockaddr_info_get() failed for My-MacBook-Pro.local AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message   Things I've tried so far that didn't work:   Setting ServerName localhost in /etc/httpd.conf Setting ServerName localhost:80 in /etc/httpd.conf Setting ServerName 127.0.0.1 in /etc/httpd.conf Setting ServerName 127.0.0.1:80 in /etc/httpd.conf Ensuring 127.0.0.1       localhost is set in /etc/hosts Repeatedly restarting Apache
84203
Recently I had to change the folder permissions of /usr folder. Now the whole sudo is not working. If I try to update my system using this command:  sudo apt-get update   I get the following message:  sudo: /usr/lib/sudo/sudoers.so must be only be writable by owner sudo: fatal error, unable to load plugins   So I tried to change the folder permissions by opening Nautilus as root by using this command  gksudo nautilus   But nothing happened. Nautilus didn't open. This is an emergency as the whole of sudo is not working. when I tried searching the solution from Google many suggested re-installation. I don't prefer re-installation. so is there any other solution?
123735
When I use the sudo command I get an error message.  sudo: /etc/sudoers is world writable sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin   If I try to use chmod on sudoers I get the message "Operation not permitted". Can someone help me fix things so sudo works again?
91005
I am having an access problem to some files and directories that I have tracked down to the group assigned to access them.    When I manually change the name of the group in the properties/permissions menu for a directory from the default setting (MyGroup) to www-data used by my Drupal Website, the directory error messages I get are gone.    There are a large number of files and directories that require this change.  If believe using chmod will change the owner which is set correctly and being new to Ubuntu, I am reluctant to experiment without a better understanding of how owner and groups work in the permissions settings.   What command changes the Group setting for a directory?
38187
I faced this issue when I want to use sudo command :  sudo: /etc/sudoers is owned by uid 1000, should be 0 sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin   then I tried a solution from a similar question in order to change the owner back to the root:   $ pkexec visudo   also I tried this one   $ pkexec chown root:root /etc/sudoers /etc/sudoers.d -R   but I have faced another issue with these commands:   Error getting authority: Error initializing authority: Could not connect: No such file or directory   So is there a solution to this issue?    Full shell issue snippets:   ubuntu@LAPTOP-D4T16P7J:~$ sudo -i sudo: /etc/sudoers is owned by uid 1000, should be 0 sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin ubuntu@LAPTOP-D4T16P7J:~$ pkexec visudo Error getting authority: Error initializing authority: Could not connect: No such file or directory ubuntu@LAPTOP-D4T16P7J:~$ pkexec chown root:root /etc/sudoers /etc/sudoers.d -R Error getting authority: Error initializing authority: Could not connect: No such file or directory     This is my /etc/sudoers file:   ubuntu@LAPTOP-D4T16P7J:~$ cat /etc/sudoers # # This file MUST be edited with the 'visudo' command as root. # # Please consider adding local content in /etc/sudoers.d/ instead of # directly modifying this file. # # See the man page for details on how to write a sudoers file. # Defaults        env_reset Defaults        mail_badpass Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"  # Host alias specification  # User alias specification  # Cmnd alias specification  # User privilege specification root    ALL=(ALL:ALL) ALL  # Members of the admin group may gain root privileges %admin ALL=(ALL) ALL  # Allow members of group sudo to execute any command %sudo   ALL=(ALL:ALL) ALL  # See sudoers(5) for more information on "#include" directives:  #includedir /etc/sudoers.d     OS info:    Ubuntu WSL2.
4367
This is a pretty simple question, at least it seems like it should be, about sudo permissions in Linux.  There are a lot of times when I just want to append something to /etc/hosts or a similar file but end up not being able to because both &gt; and &gt;&gt; are not allowed, even with root.  Is there someway to make this work without having to su or sudo su into root?
96276
I have tried:  sudo "some string" &gt;&gt; test.txt   But I am getting permission denied warning.  Can anyone help?