xfce4 reverts to mirrored dislays
Ralf Mardorf
ralf.mardorf at rocketmail.com
Sun Jan 21 04:14:33 UTC 2018
On Sun, 21 Jan 2018 01:31:36 +0100, Polytropon wrote:
>On Sat, 20 Jan 2018 20:21:34 +0100, Ralf Mardorf via freebsd-questions
>wrote:
>> On Sat, 20 Jan 2018 20:08:46 +0100, Polytropon wrote:
>> >As it seems, the immutable flag is not set.
>>
>> Indeed, this makes sense, while my second guess is idiotic, see on
>> Sat,
>>
>> 20 Jan 2018 19:23:02 +0100, Ralf Mardorf wrote:
>> >On Sat, 20 Jan 2018 19:06:47 +0100, Ralf Mardorf wrote:
>> >>actually it's impossible to change permissions of an immutable
>> >>file.
>> >
>> >Perhaps I'm mistaken regarding "permissions",however, what ever the
>> >permissions should be, the file remains immutable,
>> >un-over{ride,write}able ;).
>>
>> Somebody needs to have permission to set or clear the immutable
>> flag ;).
>
>Being able to change the permissions or ownership would first
>require "chflags noschg", which usually only root can perform.
>So even though my suggestion doesn't deserve the name "solution",
>it _should_ actually prevent any file changes, even if the
>process which changes the file is UID 0.
As already pointed out, my second guess is idiotic.
># touch /tmp/testfile
># ll -o /tmp/testfile
>-rw-r--r-- 1 root wheel - 0 2018-01-21 01:27:49 /tmp/testfile
>
># chmod -w /tmp/testfile
># ll -o /tmp/testfile
>-r--r--r-- 1 root wheel - 0 2018-01-21 01:27:49 /tmp/testfile
> ^
>Writing flag is gone.
>
># chflags schg /tmp/testfile
># ll -o /tmp/testfile
>-r--r--r-- 1 root wheel schg 0 2018-01-21 01:27:49 /tmp/testfile
>
>The file is now locked / immutable.
>
># chown ftp:ftp /tmp/testfile
>chown: /tmp/testfile: Operation not permitted
># chmod +w /tmp/testfile
>chmod: /tmp/testfile: Operation not permitted
># rm /tmp/testfile
>override r--r--r-- root/wheel schg for /tmp/testfile? y
>rm: /tmp/testfile: Operation not permitted
>
>Without a "chflags noschg" issued by root, the file will stay
>as it is (content, ownership, permissions).
A little bit off-topic, but not completely unimportant.
FreeBSD tar and cp seem to be more or less equal to Linux tar and cp,
IOW tar seems to require --xattr and cp seems to require -a to preserve
the immutable flag.
https://www.freebsd.org/cgi/man.cgi?tar(1)
https://www.freebsd.org/cgi/man.cgi?cp
So if the workaround should work, it requires to care about it, if e.g.
a backup strategy should be based upon tar or cp.
--
https://www.schneier.com/blog/archives/2018/01/spectre_and_mel_1.html
More information about the freebsd-questions
mailing list