You are not logged in.

#1 2023-04-26 10:00:49

mdcclxv
Member
Registered: 2022-04-26
Posts: 207

[SOLVED] File permissions issue

Hi there,

So, I have this Preferences file which I want it read-only for the app it belongs to, namely Edge. So, I chown-ed it to root:root and chmod-ed it to 444. Yet, Edge is able to delete it and recreate it.
My user is a sudoer, but sudo is configured to ask for password every time.

So how is that possible?

Thanks in advance.

Last edited by mdcclxv (2023-04-26 11:47:39)

Offline

#2 2023-04-26 10:37:04

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,344

Re: [SOLVED] File permissions issue

Deletign doesn't edit the file, but the directory (which is probably hopefully owned by your regular UID)
Set the file immutable, "chattr +i"

Last edited by seth (2023-04-26 10:37:16)

Offline

#3 2023-04-26 10:41:41

jonno2002
Member
Registered: 2016-11-21
Posts: 868

Re: [SOLVED] File permissions issue

the file is still able to be deleted even though its not able to be read or modified, you need to set it immutable using 'chattr +i' as root.
more info here: https://wiki.archlinux.org/title/File_p … attributes

[EDIT] dammit, beaten to it

Last edited by jonno2002 (2023-04-26 10:42:31)

Offline

#4 2023-04-26 11:47:02

mdcclxv
Member
Registered: 2022-04-26
Posts: 207

Re: [SOLVED] File permissions issue

Works like a charm. This file attributes stuff is completely new info for me. Thank you both.

Last edited by mdcclxv (2023-04-26 11:47:21)

Offline

Board footer

Powered by FluxBB