[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: I need help with my var partition.

On 5/1/23 19:51, Maureen L Thomas wrote:
Unfortunately I cannot install anything.  I used the command line and the app but neither of them will work.  I have no idea what to do next. I used su and sudo first.  It just keeps saying it cannot connect with the base from which I get updates, etc.  I used the reinstall on brasero and it just said that it was up to date.  I am so confused.

The earlier reply by The Wanderer to this post may well be the correct in suggesting use of dpkg rather than apt. Apt is usually preferable if it will work, but dpkg sometimes will work when apt will not.

There could be several files in /var/cache/apt/archives that are base-files packages for different Debian releases or updates. You should take some care to use the right one. The correspondence between the file to use and the contents of /etc/debian_version is straightforward. I have:

# ls -l /var/cache/apt/archives/base-files*
-rw-r--r-- 1 root root 70140 Dec 11 14:13 /var/cache/apt/archives/base-files_11.1+deb11u6_amd64.deb
-rw-r--r-- 1 root root 70132 Apr 23 14:57 /var/cache/apt/archives/base-files_11.1+deb11u7_amd64.deb

# cat /etc/debian_version

So: this system is Release 11 update 7, and the corresponding base-files package is

Using the wrong one by mistake might not be very noticeable, as base files probably change little from release to release;

In any follow up messages, please copy and paste the actual commands used and their output in addition to any description of the results. Descriptions may omit useful details. And prefer the command line to graphical applications because it usually contains more detailed and useful information and is easier to copy and paste into an email.

Tom Dial

On 5/1/23 9:15 PM, Tom Dial wrote:
This Debian-user thread seems to have gone silent, but it is not clear whether your problem is solved. If it is, just ignore this and move on. If not:

The Wanderer, in an earlier post (04/28/2023 at 19;02), suggested reinstalling the base-files package. I believe this is the correct procedure, at least to start with. It should be relatively free from any risk of doing further damage to your system. The same post also suggested you might need to reinstall other packages if they had created subdirectories under /var that are not included in the base-files package, That also should not significantly risk any further damage. Reinstalling installed packages sometimes helps and in my experience (almost 30 years now) is unlikely to be harmful. Reinstalling base-files (and other packages as needed) also should correct any permission problems that may have crept in.

How to reinstall a package depends on how you maintain or upgrade your system.

If you use synaptic or aptitude, both have reinstall options that you can choose from the menu or submenu you would use for a new package installation.

If you log in as root on a terminal or terminal emulator to install and upgrade software, the command would be

apt install --reinstall <name of package> - for example,
apt install --reinstall base-files

If you use sudo in a terminal or terminal emulator to maintain software, use the above commands prefixed by "sudo" as you normally would for actions that need administrator privileges.

This should reinstall the version of the base-files (or other named package) that matches the most recently installed version.

I think the reinstall process might sometimes pause to ask you to choose between installing the default configuration file from the package or keeping an existing one that you might have changed. It should be safe to keep the one already installed.

If you have questions about any of this, feel free to ask, either privately or on the list.

Tom Dial

On 4/28/23 20:36, Maureen L Thomas wrote:
Here is what I got.

root@debian:/var# /bin/ls -ld */
drwxr-xr-x  2 root root   4096 Apr 28 15:46 backups/
drwxr-xr-x 19 root root   4096 Apr 12 20:20 cache/
drwxr-xr-x  2 root root   4096 Apr 28 20:59 cores/
drwxr-xr-x  2 root root   4096 Nov 13  2020 games/
drwxr-xr-x 62 root root   4096 Apr 12 20:20 lib/
drwxrwsr-x  2 root staff  4096 Sep 19  2020 local/
drwxrwxrwt  3 root root    100 Apr 28 21:13 lock/
drwxr-xr-x  8 root root   4096 Apr 28 21:36 log/
drwx------  2 root root  16384 Nov 12  2020 lost+found/
drwxrwsr-x  2 root mail   4096 Nov 12  2020 mail/
drwxr-xr-x  2 root root   4096 Nov 12  2020 opt/
drwxr-xr-x 27 root root    760 Apr 28 22:31 run/
drwxr-xr-x 14 root root   4096 Apr 27 22:58 snap/
drwxr-xr-x  7 root root   4096 Nov 12  2020 spool/
drwxr-xr-x  8 root root   4096 Apr 28 22:32 tmp/

Reinstalling the base-files package should create or correct the following directories under /var:

On 4/28/23 10:17 PM, Greg Wooledge wrote:
On Fri, Apr 28, 2023 at 10:05:01PM -0400, Maureen L Thomas wrote:
Yes my figures are very similar to yours.  But even after a reboot I still
cannot burn a back up disk.
Do not look at the NUMBERS.




The numbers mean nothing.

On 4/28/23 9:04 PM, Greg Wooledge wrote:
Make sure you get the ownership and permissions correct.

unicorn:/var$ /bin/ls -ld */
drwxr-xr-x  2 root root  4096 Apr 22 06:25 backups/
drwxr-xr-x 12 root root  4096 Jul 31  2022 cache/
drwxr-xr-x  3 root root  4096 Mar  3  2018 games/
drwxr-xr-x 50 root root  4096 Jul 31  2022 lib/
drwxrwsr-x  2 root staff 4096 Nov 19  2017 local/
See that?  Group write.  Set-group-id.  Group staff.  Probably not a big
deal, because who the hell uses /var/local for anything, but there is
no excuse for not checking the OWNER, GROUP and PERMISSIONS.

drwxrwxrwt  3 root root    80 Mar 25 16:03 lock/
Group and world write.  Sticky bit.

drwxr-xr-x 15 root root  4096 Apr 24 08:12 log/
drwxrwsr-x  2 root mail  4096 Oct 28  2021 mail/
Group write, setgid.

drwxr-xr-x  2 root root  4096 Jan 11  2018 opt/
drwxr-xr-x 10 root qmail 4096 Jan 12  2018 qmail/
drwxr-xr-x 26 root root   760 Mar 27 15:39 run/
drwxr-xr-x  6 root root  4096 Jan 29  2021 spool/
drwxrwxrwt  6 root root  4096 Apr 28 21:02 tmp/
Group and world write.  Sticky bit.

THIS is what matters.

Reply to: