Issue: After several hours investigating the reason that ate my disk space and brought it to zero, I figured that it was due to changing the permission in the root directory (I can't recall the exact name of the root directory). I remember renaming a file in a root directory by changing the permission recursively using chmod -R
option (for /usr/bin/
directory). I found the file that ate my space using this answer, which showed following:
631G
in /var/log/cups/error_log.1
, and
110G
in /var/log/cups/error_log
Because of zero disk space, I cannot reboot, so I cannot login into the system except for recovery. This problem is somewhat similar to this suggestion, except that I cannot implement that suggestion for lack of sudo
privileges, which is probably related to permissions.
Question: I tried deleting the above error log files, but it won't allow because my sudo
command has been screwed up. I believe this issue is related to the insecure permission issue that resulted in forming a log file discussed above. The error that stops me from using sudo says the following:
/usr/bin/sudo must be owned by uid 0 and have the setuid bit set
I have tried some suggestions to restore sudo privileges (e.g. this, this, and this), but it didn't help...basically, it can't implement those suggesting that operation is not permitted. I am using the terminal through Alt+F2
mode when I try to reboot.
I would like to delete that error log and be able to use my system normally again without any issues.
I did some search over several hours and it shows two approaches
Approach 1: Although this question with similar problem provides some suggestions, for e.g. to stop the cups
, delete the log file, etc., but those are not working for me as I explained earlier because my sudo
is not working.
Approach 2: This problem occured after I changed the permission to /usr/bin/
directory, so it may need reverting back the permissions. This question is on a similar line, but I can't say whether the answer is useful.
EDIT
I have deleted the large file from root shell in recovery mode, and tried stopping the cups using the suggestion from approach 1 so the error log file does not increase in size again. I did that because none of the commands suggested by the answers could help revert the permissions, so when I logged into the OS, the error log file started to increase. Because of this I had to stop the cups from reocvery mode again. However, after doing these things I am still not able to access the sudo, and I get the same error as described above in the question. One issue is solved, which is deleting the file that ate up my space, but the other important problem of reverting back the permissions is not resolved. Also, once I restarted the cups, the file is increasing in size again (already 3.5 G in few min) with following commands:
W [05/Sep/2017:05:10:42 -0400] Notifier for subscription 2 (dbus://) went away, retrying!
E [05/Sep/2017:05:10:42 -0400] File \"/usr/lib/cups/notifier/dbus\" has insecure permissions (0100755/uid=1000/gid=1000).
W [05/Sep/2017:05:10:42 -0400] Notifier for subscription 2 (dbus://) went away, retrying!
E [05/Sep/2017:05:10:42 -0400] File \"/usr/lib/cups/notifier/dbus\" has insecure permissions (0100755/uid=1000/gid=1000).
W [05/Sep/2017:05:10:42 -0400] Notifier for subscription 2 (dbus://) went away, retrying!
E [05/Sep/2017:05:10:42 -0400] File \"/usr/lib/cups/notifier/dbus\" has insecure permissions (0100755/uid=1000/gid=1000).
W [05/Sep/2017:05:10:42 -0400] Notifier for subscription 2 (dbus://) went away, retrying!
EDIT 2
Following is my output of $ ls -al /usr/bin/su*
-rwxr-xr-x 1 root root 136808 Jul 4 03:37 /usr/bin/sudo
lrwxrwxrwx 1 root root 4 Jul 4 03:37 /usr/bin/sudoedit -> sudo
-rwxr-xr-x 1 root root 47680 Jul 4 03:37 /usr/bin/sudoreplay
-rwxr-xr-x 1 root root 39672 Mar 2 2017 /usr/bin/sum
sudo
powers it would be difficult!ls -la /usr/bin/sudo
will tell you, if you want to add the output of that command to this thread. It's hypothetically possible that the lack of disk space is somehow interfering with the sudo command. If you followed this answer as you said and you can successfully get to the root shell, why not try deleting the error logs in question that way, as the root user?ls -la /usr/bin/sudo
is-rwxr-xr-x 1 user_name user_name 136808 [date and time] /usr/bin/sudo
. Regarding you other question, the problem is I can't acess sudo privilege from the terminal that I am able to use...which is not inside the OS; I am accessing it byAlt+F2
once the system starts to boot. Please let me know if you need any clarification to help.