Symlink directory to /dev/null ( softether logging )

So softether client is hardwired to do logging and it doesn't care if you disable it or not. The problem is it fills up the entire overlay and now the system is read-only. Is there any way i can symlink the directory to null or even disable the logging by changing the permissions ?

where is it sending the logs? You could create an empty file and then remove write permissions from the file.


So what if you did this:

rm /usr/libexec/softether/client_log
touch /usr/libexec/softether/client_log
chmod 444 /usr/libexec/softether/client_log

You may get errors in the syslog that softether cannot write to the log, but at least it won't be able to write to that file.

Another approach would be to do something like the below which will direct it to your tmp directory (which is RAM based, but there is a risk that this could fill up your RAM).

rm /usr/libexec/softether/client_log
ln -s /tmp/softether/client_log /usr/libexec/softether/client_log

or this which would redirect to /dev/null like you originally suggested.

rm /usr/libexec/softether/client_log
ln -s /dev/null /usr/libexec/softether/client_log

Well the problem is that client_log is a folder. And inside it is client_DDMMYY.txt files which are made daily.. so how can i redirect the whole thing ( folder ) not a file ?

Ok. Try making the directory and then making the directory read only.

mkdir /usr/libexec/softether/
chmod 444 /usr/libexec/softether/

Logging to /usr/libexec/softether/client_log/ sounds like quite a FHS violation to me…

What about mounting a small (0.5-1 MB) tmpfs on /usr/libexec/softether/client_log/?

Yeah idk why it does that to be honest. Also welcome back slh haven't seen you in a while.

Okay will do. How can i retain access to the overlay in rw ? Failsafe it then mount mtdblock3 ?

I think i did already. I tried setting the permission to nobody i think.

Permission nobody doesn’t solve the problem since root can write anywhere. To prevent writing, make it read only by permissions 444

1 Like

1 Like

Okay will give both answers a try

How can i clear up some space since overlay is RO now ? How to boot into failsafe without losing everything?

You will not lose everything when you boot into failsafe mode... but you will need to do that if your file system is read-only because it is full.

Boot into failsafe, then issue


From there, you can delete the contents of the offending folder:

rm -rf /usr/libexec/softether/client_log/*

And if you're using my idea of making that folder readonly... [EDIT: I just tested this and it doesn't seem to work... maybe try the symlink to /dev/null method or what @slh recommended].

chmod 444 /usr/libexec/softether/

[EDIT: the above idea doesn't seem to work.]
Then reboot

reboot now

And you should be good to go.

EDIT 2: You could make a read-only file which would then prevent the creation of the directory:

rm -r /usr/libexec/softether
touch /usr/libexec/softether
chmod 444 /usr/libexec/softether

See. They don't work i tried everything idk why to be honest lol. It has superpowers or something