Monday, May 6, 2024
 Popular · Latest · Hot · Upcoming
8
rated 0 times [  8] [ 0]  / answers: 1 / hits: 1093  / 1 Year ago, sun, april 16, 2023, 1:50:24

I am running Ubuntu 18.04. When I run:


ls -la /var

I get the following:


drwxr-xr-x 10 root root   4096 Jan  2 15:46 .
drwxr-xr-x 27 root root 4096 Jan 15 06:25 ..
drwxr-xr-x 10 root root 4096 Jan 6 06:15 cache
drwxrwxrwt 2 root root 4096 Jan 12 06:41 crash
drwxr-xr-x 25 root root 4096 Jan 4 11:06 Lib
lrwxrwxrwx 1 root root 11 Dec 27 07:22 lock -> ../run/lock
drwxrwxr-x 8 root syslog 4096 Jan 10 06:06 log
drwx------ 6 root root 4096 Jan 15 06:03 run
drwxr-xr-x 4 root root 4096 Jan 3 14:54 snap
drwxr-xr-x 4 root root 4096 Dec 27 07:22 spool
drwxr-xr-x 6 root root 4096 Jan 15 06:03 tmp

AFAIK /var/run should be symlink to /run. I have some problems in my system as described in 'who' command has blank output when using SSH, so is it because /var/run is not a symlink?
Can I safely remove it and replace it with a symlink?


More From » filesystem

 Answers
1

You're right that /var/run is normally a symlink.


However, if /var/run does not contain any files, it should be safe to replace with a symlink. If there are files, you should move them to /run first.


When the directory /var/run is empty, you can replace with a symlink like this:


$ rmdir /var/run
$ ln -s /run /var/run

Referring to your previous question, I guess this could be the cause of failure, since /run contains the socket /run/dbus/system_bus_socket.


[#70] Monday, April 17, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
bblerest

Total Points: 240
Total Questions: 119
Total Answers: 113

Location: Wallis and Futuna
Member since Mon, May 18, 2020
4 Years ago
bblerest questions
Fri, Nov 4, 22, 06:21, 2 Years ago
Tue, Sep 27, 22, 12:22, 2 Years ago
Tue, Dec 14, 21, 09:20, 2 Years ago
;