Readonly file and can't change permissions
Clash Royale CLAN TAG#URR8PPP
There is a file with read only
permissions, but even root
can't chmod
it.
Permissions of the file: -rw-r--r--
After trying to chmod 777
:
chmod: changing permissions of ‘motd’: Operation not permitted
I'm doing it from the root
account. How is it possible to lock a file like this?
permissions root chmod readonly
add a comment |
There is a file with read only
permissions, but even root
can't chmod
it.
Permissions of the file: -rw-r--r--
After trying to chmod 777
:
chmod: changing permissions of ‘motd’: Operation not permitted
I'm doing it from the root
account. How is it possible to lock a file like this?
permissions root chmod readonly
4
lsattr /etc/motd
and check if the immutable bit is set. You will see ani
in the output if it is.
– MikeA
Sep 28 '16 at 16:01
1
What filesystem is this file on?
– Gilles
Sep 29 '16 at 0:06
Yeah it was lsattr I used chattr and I can change it now, thanks ;)
– Furjoza
Sep 29 '16 at 8:26
add a comment |
There is a file with read only
permissions, but even root
can't chmod
it.
Permissions of the file: -rw-r--r--
After trying to chmod 777
:
chmod: changing permissions of ‘motd’: Operation not permitted
I'm doing it from the root
account. How is it possible to lock a file like this?
permissions root chmod readonly
There is a file with read only
permissions, but even root
can't chmod
it.
Permissions of the file: -rw-r--r--
After trying to chmod 777
:
chmod: changing permissions of ‘motd’: Operation not permitted
I'm doing it from the root
account. How is it possible to lock a file like this?
permissions root chmod readonly
permissions root chmod readonly
edited Sep 28 '16 at 16:42
Tomasz
9,37852965
9,37852965
asked Sep 28 '16 at 14:59
FurjozaFurjoza
612
612
4
lsattr /etc/motd
and check if the immutable bit is set. You will see ani
in the output if it is.
– MikeA
Sep 28 '16 at 16:01
1
What filesystem is this file on?
– Gilles
Sep 29 '16 at 0:06
Yeah it was lsattr I used chattr and I can change it now, thanks ;)
– Furjoza
Sep 29 '16 at 8:26
add a comment |
4
lsattr /etc/motd
and check if the immutable bit is set. You will see ani
in the output if it is.
– MikeA
Sep 28 '16 at 16:01
1
What filesystem is this file on?
– Gilles
Sep 29 '16 at 0:06
Yeah it was lsattr I used chattr and I can change it now, thanks ;)
– Furjoza
Sep 29 '16 at 8:26
4
4
lsattr /etc/motd
and check if the immutable bit is set. You will see an i
in the output if it is.– MikeA
Sep 28 '16 at 16:01
lsattr /etc/motd
and check if the immutable bit is set. You will see an i
in the output if it is.– MikeA
Sep 28 '16 at 16:01
1
1
What filesystem is this file on?
– Gilles
Sep 29 '16 at 0:06
What filesystem is this file on?
– Gilles
Sep 29 '16 at 0:06
Yeah it was lsattr I used chattr and I can change it now, thanks ;)
– Furjoza
Sep 29 '16 at 8:26
Yeah it was lsattr I used chattr and I can change it now, thanks ;)
– Furjoza
Sep 29 '16 at 8:26
add a comment |
1 Answer
1
active
oldest
votes
Verify the ownership of the file with
ls -l
Change ownership of the file with
chown root motd
root is the owner ;( -rw-r--r--. 1 root root 989 Sep 19 17:20 motd
– Furjoza
Sep 28 '16 at 15:52
3
@Furjoza But the dot at the end of the permission string indicates it has extended permissions. Edit in your question the output ofls -Z /etc/motd
andlsattr /etc/motd
andlsattr -d /etc
– user4556274
Sep 28 '16 at 15:56
Root doesn't need to own the file to modify either the file or the properties.
– Stephan
Sep 28 '16 at 20:05
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f312950%2freadonly-file-and-cant-change-permissions%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Verify the ownership of the file with
ls -l
Change ownership of the file with
chown root motd
root is the owner ;( -rw-r--r--. 1 root root 989 Sep 19 17:20 motd
– Furjoza
Sep 28 '16 at 15:52
3
@Furjoza But the dot at the end of the permission string indicates it has extended permissions. Edit in your question the output ofls -Z /etc/motd
andlsattr /etc/motd
andlsattr -d /etc
– user4556274
Sep 28 '16 at 15:56
Root doesn't need to own the file to modify either the file or the properties.
– Stephan
Sep 28 '16 at 20:05
add a comment |
Verify the ownership of the file with
ls -l
Change ownership of the file with
chown root motd
root is the owner ;( -rw-r--r--. 1 root root 989 Sep 19 17:20 motd
– Furjoza
Sep 28 '16 at 15:52
3
@Furjoza But the dot at the end of the permission string indicates it has extended permissions. Edit in your question the output ofls -Z /etc/motd
andlsattr /etc/motd
andlsattr -d /etc
– user4556274
Sep 28 '16 at 15:56
Root doesn't need to own the file to modify either the file or the properties.
– Stephan
Sep 28 '16 at 20:05
add a comment |
Verify the ownership of the file with
ls -l
Change ownership of the file with
chown root motd
Verify the ownership of the file with
ls -l
Change ownership of the file with
chown root motd
edited Sep 28 '16 at 16:39
Tomasz
9,37852965
9,37852965
answered Sep 28 '16 at 15:51
sbayerciscosbayercisco
251
251
root is the owner ;( -rw-r--r--. 1 root root 989 Sep 19 17:20 motd
– Furjoza
Sep 28 '16 at 15:52
3
@Furjoza But the dot at the end of the permission string indicates it has extended permissions. Edit in your question the output ofls -Z /etc/motd
andlsattr /etc/motd
andlsattr -d /etc
– user4556274
Sep 28 '16 at 15:56
Root doesn't need to own the file to modify either the file or the properties.
– Stephan
Sep 28 '16 at 20:05
add a comment |
root is the owner ;( -rw-r--r--. 1 root root 989 Sep 19 17:20 motd
– Furjoza
Sep 28 '16 at 15:52
3
@Furjoza But the dot at the end of the permission string indicates it has extended permissions. Edit in your question the output ofls -Z /etc/motd
andlsattr /etc/motd
andlsattr -d /etc
– user4556274
Sep 28 '16 at 15:56
Root doesn't need to own the file to modify either the file or the properties.
– Stephan
Sep 28 '16 at 20:05
root is the owner ;( -rw-r--r--. 1 root root 989 Sep 19 17:20 motd
– Furjoza
Sep 28 '16 at 15:52
root is the owner ;( -rw-r--r--. 1 root root 989 Sep 19 17:20 motd
– Furjoza
Sep 28 '16 at 15:52
3
3
@Furjoza But the dot at the end of the permission string indicates it has extended permissions. Edit in your question the output of
ls -Z /etc/motd
and lsattr /etc/motd
and lsattr -d /etc
– user4556274
Sep 28 '16 at 15:56
@Furjoza But the dot at the end of the permission string indicates it has extended permissions. Edit in your question the output of
ls -Z /etc/motd
and lsattr /etc/motd
and lsattr -d /etc
– user4556274
Sep 28 '16 at 15:56
Root doesn't need to own the file to modify either the file or the properties.
– Stephan
Sep 28 '16 at 20:05
Root doesn't need to own the file to modify either the file or the properties.
– Stephan
Sep 28 '16 at 20:05
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f312950%2freadonly-file-and-cant-change-permissions%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
4
lsattr /etc/motd
and check if the immutable bit is set. You will see ani
in the output if it is.– MikeA
Sep 28 '16 at 16:01
1
What filesystem is this file on?
– Gilles
Sep 29 '16 at 0:06
Yeah it was lsattr I used chattr and I can change it now, thanks ;)
– Furjoza
Sep 29 '16 at 8:26